I got them a couple times when I was pregnant, the would come in the middle of the night, and I screamed so loud DH thought I was in labor! Nothing like waking up to that out of a sound sleep at 2 am!
My OB said it could be that I needed more potassium....suggested I eat more bananas, the thought of that was enough to make me sick, but that's another problem altogether.
Hope you find out what's causing them so you can fix it!