Cramping during sex?

B

I’m 24 weeks tomorrow and this was the first I’ve experienced this. I was ontop and I cramped all over my lower belly. Has this ever happened to anyone else? We definitely stopped and changed around but it scared the heck out of me