Sex during pregnancy

Sara
I'm 27 weeks and today when my husband and I were "getting it on" lol the right side of my stomach would have this cramping pain in it. Is this a problem? Or is it just my child? The cramping went away after we finished but just curious !