Eat bananas before bed! Seriously. They help prevent cramps, pregnant or not. Also, when you do get them, flex your foot. DO NOT point your toes out. Grab your foot and pull it towards you so it's like your making an L with your leg and foot. That should relieve it almost instantly.
Oh I get leg cramps all the time they are horrible! Baths help with a little Epsom salts and also laying down with your legs elevated helps me as well!
Charlie horses are the worst.
When that happens stand up and bang your foot on the floor, it makes it go away instantly
I used to have them alot while sleeping. Some1 advised me eating a banana b4 going to bed believe me it really worked.