Mild on-and-off calf pain with no tingling, after your
vitamin D has normalised, is most often simple muscle fatigue with low magnesium, low potassium or plain dehydration - your instinct about magnesium is reasonable. But you have acute nephritis in your history, and that changes things:
kidney disease itself causes cramps through electrolyte and
calcium-phosphate shifts, and magnesium or potassium supplements must not be taken blindly with a kidney problem. Get serum magnesium, potassium, sodium, calcium,
creatinine and eGFR done before adding anything. Also keep water intake up and stretch the calves before sleep. Red flag: if one calf becomes swollen, warm, tender or the pain comes on walking and eases on rest, get it seen the same day - that is clot or artery territory. Share the reports with me on a Practo consult and I will correct exactly what is low, safely for your kidneys.