Sex to induce labor

Shonte’

When you have sex to induce labor how long do you let semen stay inside for it to work? Also, do you need to lay on your back with your legs up to insure it stays in well enough to work?