Cramps can be from too little calcium, or too little magnesium.
Take Calcium at Bedtime
Patients sometimes call the office complaining that they have cramps in their legs after parathyroid surgery. We have found that taking an extra calcium pill at bedtime is helpful. Or make sure you save one of the calcium pills you take so you can take it at bedtime.
Magnesium May Be the Problem
However, when studying this problem we noticed that many of our patients having muscle cramps have low magnesium. In about 2015 we started telling our patients with cramps to start taking magnesium and this has worked out extremely well. It turns out that magnesium has a +2 charge just like the calcium molecule and many patients with calcium problems also have magnesium problems.
The typical magnesium dose is 400mg per day and it can be found at any pharmacy and many supermarkets. Taking it in the evening seems to work the best. The picture is a typical magnesium supplement that works great.