I've had problems with leg cramps (charlie horses), all over muscle cramps since I was a little kid. The doctors have a list for what can cause them, dehydration is one factor which I think is what causes mine since I've never been much of a drinker (for anything except coffee). I've been trying to drink more water and once a week if I haven't, I drink a Powerade or something similiar and staying hydrated has helped alot with those cramps.
Also, a remedy for leg cramps at night is to not tuck the sheets in too tight as well as keeping a scrap piece of bar soap nearby and a pair of socks. For some reason, putting on the sock and putting the scrap piece of soap inside totally stops the cramp and it'll stay gone (no repeats) with the soap in the sock. [wierd, I know but it works. I wish someone had told me that when I was a kid because I suffered for years!]