Hi, Sue! I hope your leg cramps have improved with some of the suggestions offered by others thus far. Have you gotten your potassium and magnesium levels checked by your doctor? That may be a worthwhile starting point.
Also, how you take/receive your supplements (in what form and how/when you choose to consume them) has a huge impact on their ability to be utilized by your body. Magnesium, in particular, isn't very bio-available in many of the forms that it comes in in OTC supplements. After doing research on magnesium supplements a few years ago, I found a supplement that offers it in a form that the body can actually use it and have been taking it nightly since, tapering it to the dose that my body likes most. It's called Natural Vitality CALM. For me personally, about a teaspoon dissolved in a few ounces of hot water right before bed does the trick perfectly!
I've also found I need to avoid eating certain things within a few hours of bedtime, as those can still trigger awful cramps, but for the most part I remain leg-cramp-free these days and am able to get a much more steady and worthwhile night's sleep.
Good luck and many blessings to you!
What foods do you find that can trigger cramps? My issue is more restless legs. I do think Ca and Mg does help.