Charley Horse in Stomach

I’m coming up on 21 weeks of pregnancy and yesterday during sex (from the back) I got a stomach cramp, not like a menstrual cramp but like a charley horse on my lower right side. Then today I was walking around Kohls shopping for Father’s Day and I got the same stomach cramp. I had my anatomy scan last Monday and everything came back perfectly. Has anyone had this happen before? Is this due to dehydration? Vitamin deficiency? I still feel baby boy kick and move but it’s starting to worry me.