What was this cramp??

I laid down on my left side tonight and after about a minute I got an increasingly painful cramp low on my right side where babys back is. I struggled to get up through the pain and when I stood up, a few seconds later she started moving around like CRAZY like she was not happy with the position I had been in. She mellowed out after a few seconds and then continued to kick me in the ribs for a few minutes. What was this?? I'm scared to lie down again tonight.