Sex at 37 weeks

Brianna
A quick back story...so I have 2 kids both were born "early" my oldest was 36 weeks and 7lbs9oz my 2nd 37 weeks 6lbs9oz. Totally healthy babies. Doctors have said it could just be my body, and it may not hold to term. My 3rd pregnany I had a miscarriage. And this pregnancy has been good. I am now 37 weeks. At 33 weeks my doc told me i was dilated at 1cm and part of my mucus plug had come out. With my history of early births he advised me to not have sex. Well, now I am 37 weeks considered to not be premature anymore. Would it be safe to engage in sex. He did not mention to still abstain from it at my appointment. And i did forget to ask. Tia.