This is a'gonna sound weird, but are you making sure you have enough potassium in your diet? Potassium deficiency may not be the only cause, but it can definitely contribute to the kinds of muscle spasms you're getting at night.
Hi Francine. It's Potassium. You can also get a good amount of potassium by eating bananas.
If the potassium/bananas doesn't work then it will be the magnesium/calcium/vitamin D that needs to be supplemented. Make sure you get the supplemnet with the right ratios and take it once in the am and once on the pm. The legs cramps disappeared in about 3 days.