I have had lots of problems with leg cramps and have discovered that drinking a glass or two of tonic water before bed is very helpful. It can also be caused by vitamin and mineral deficiencies, magnesium, potassium and calcium so maybe have your blood checked for deficiencies. I started eating a banana every day which also seems to have helped.