In reply to thelostjockey:
I suffer from very painful leg cramps, including most painfully in the thigh muscles. They come on about an hour after going to sleep. almost exclusively on the first night of a mountain walking trip, and only if the first day involves a good long descent (which is normally but not always, the case).
Drinking plenty of water during the evening helps, and I use potassium chloride salt with the evening meal. (eg "LoSalt" which is mostly potassium chloride rather than sodium chloride). Potassium is supposed to be good for avoiding cramps and not a factor in heart disease. It tastes a bit different, but basically does the same job. I also try to eat a banana or two, also high in potassium. I have to say that none of this guarantees I avoid the cramps. but I'm pretty sure it helps to make them less severe.
I'm also not a doctor!
Martin