<s>[INST] I am 70 and I get very painful foot cramps at night. I read that I could be low in potassium or magnesium, so I started taking both - potassium with lunch and magnesium right before I go to bed. The cramps seem to have eased some but are not gone completely. Any advice you can give would be greatly appreciated!! [/INST] Hi, I think electrolyte imbalance, vitamin D and B12 deficiency and spinal canal stenosis are the common conditions causing cramps at night. So I recommend serum electrolytes and serum vitamin D3 and B12 levels. If they are normal go for MRI spine. The treatment would depend on the cause. Hope I have answered your query. Let me know if I can assist you further. Regards, Dr. Gopal Goel, Orthopedic Surgeon </s>