you might be low on b vitamins and potassium if you are getting leg cramps, also possibly dehydrated
I remember one night having a cramp that just would not stay away. I'd just be drifting off to sleep when it would strikle again. Took half a quinine, cramp was history.