Masturbating and sex

Natty

I know sex can help bring on labor, but what about masturbating. Sex can be extremely uncomfortable now (39+3) and I was curious if masturbating could help bring on labor or only sex