I started getting that when I was in later end of my second pregnancy and it re-occurs now and then, maybe more than one night at a time.
It seems to be a muscle or blood flow problem and alot of people suffer with this.
If I sit crunched up with out having very much exercise or movement using my legs I sometimes get the dreaded cramp.
My friend eats some salt which eases her, but for me it is the way I sleep or sit for long periods, that causes mine.
I would say have plenty of exercise and sit with your legs uncross ect so as the blood flows correctly. I don't get it often but when I do, I use the stairs to walk up and down to stretch my leg muscles. I tend to drink pleny of water when I get it also.
I don't know what your daily physical activity is like, and that's likely to have a big impact on the cramping. Make sure you're on a multivitamin (potassium, calcium, and magnesium could all be responsible-- also possible, but less well documented, is vitamin E) if you're not getting enough vitamins/minerals in your diet (make sure to check that none of these could conflict with or exacerbate other potential conditions-- I'd think a general multivit should be safe, though), make sure you're stretching before and after exercise, and a simple stretching routine before bed could be helpful. Also make sure you stay hydrated. Lots and lots of water.
Keep us updated. Good luck.