We did it till he broke my water then wr went to the hospital and that was at 39W-6D
Sex is fine until your water breaks, unless your doctor says otherwise. However, it will do nothing to help you dilate if your body isn't already starting the process.