Sex to help kick start labor

What about sex helps? Orgasm? The sperm? Just the whole act in general?

Will masterbating have the same affect in starting it? Or does it have to be sex?