A:Luis,
After she is 37 weeks gestation, it is very safe to have sex with her. The semen contains prostaglandin which causes the pregnant woman to have contractions. It is safe for her to go in labor after 37 weeks since the baby's lungs are already mature in case she delivers. I have seen patients who come to Labor and Delivery complaining of labor pains at 28 weeks gestation because they had sex with their partners. Sometimes they get admitted to the hospital for Preterm Labor.