Periods like cramps after sex

Ridlid87
I am 37 weeks today and since week 34 I was on bedrest due to the risk of early labor untill 37 week which is ThanksGOD here. So I have done sex after 4 or 5 weeks and firstly it feels difficult to get thingy in and secondly then I have experienced periods like cramps like 3 times in a row. I lye down and they subsided then again when I did some work it started again and remain for 5 to 10 minutes then went away.. I dnt know what was that.. My OB told me today that if I experience blood, water like discharge, bad periods cramps or less baby movement then I should come to an emergency and also if I will get any unusual symptom... Plz help