Paul - I've had those darn things for several years. Peacefully sleeping, then a sudden violent spasm in the calf, thigh, foot, etc. So bad I can't stand or walk. Pain so bad I get nauseated and faint. Causes may be dehydration, low potassium and/or magnesium, overuse after not exercising, etc.
Solution: one slice of dill pickle before bed each night, and the cramps have vanished (hopefully) forever, at least for the last month. Other folks take a teaspoon of cider vinegar to the same effect. Tonic water will help, but didn't do much for me.
But have your doctor check your potassium and magnesium levels too.
Hope this helps!
Tom M.