Some find drinking tonic water (diet, of course) helps, since it contains quinine.
I now drink tonic water regularly (it sure tastes nicer than baking soda), as a preventative measure.
Will do so unless it stops working.
My physio suggested a magnesium supplement might help. I was getting regualr calf cramps due to an achilles problem. When i started taking the magnesium supplement the frequency of the night time cramps reduced. i have also been doing achillies stretching excercises. If you are taking medication or have complex medical problem speak to a pharmacist ot your PP before taking supplements.
Do not be tempted to accept Quninine Sulphate prescription from your doctor. Banned in US 1999 having caused the deaths of seventy long-term users like me who now have kidney damage.