Extreme pain

So last night my partner and I had sex, soon after I could barely move Anything, from my hips to right under my shoulders were in serious cramping pain and if I moved at all it only got worse.i had my partner grab me some pain relievers, I took them and went to sleep on a scale of 1-10 (ten being so much pain about to throw up) I was in a 9, I awoke this morning only in a pain stage of 3,

My question is, what could have caused this