What Causes Leg Cramps, and How Do You Stop Them?
Ken D. Berry, MD, family physician
Published 11/12/26
The most common cause of leg cramps is not getting enough salt, followed by low electrolytes, temporary overexertion and medications. Those first causes are usually not dangerous and you can fix them yourself. The rarer causes, like a blood clot, blocked leg arteries, or diseases such as cancer and liver disease, can be very dangerous and need your doctor. I rank them here from most common to least common.
Is low salt the most common cause of leg cramps?
Yes, by far. Starting about 50 or 60 years ago we were taught that salt is bad for us and that we should cut back. In my view, there's no research to support that. Human beings are mammals, and all mammals love and need salt every day. So stop being afraid of salt and eat salt to taste.
Focus on real salt. A lot of superstore salt contains dextrose, which is a sugar, and anti-clumping agents. Real salt will clump, and that's okay. Salt from the modern oceans can be full of microplastics and nanoplastics, so I prefer a real salt from an ancient ocean.
Which electrolytes help with leg cramps?
Magnesium, potassium and calcium, plus arachidonic acid, which helps your muscle cells use the electrolytes.
- Calcium: you don't necessarily need a supplement. Eat calcium-rich foods like fish whose bones you eat, such as sardines and anchovies. Dark leafy greens give you some too.
- Magnesium and potassium: almost everyone in modern society is depleted, whatever diet they eat, so you have to go out of your way. I eat foods rich in both and also put electrolyte drops in my coffee and other drinks.
- Arachidonic acid: your body makes it, and you get it from fatty meat, red and white, and seafood. It helps calcium get into your muscle cells so they can contract and relax properly.
Can overexertion cause leg cramps?
Yes. If you live a sedentary life and then go on an eight mile uphill hike, you may get leg cramps that night or the next. That's normal and common and not a sign of anything medically wrong. They go away in a few days. The answer is to be more active more often, because the more you use, stretch and strengthen your muscles, the less likely you are to cramp.
Which medications cause leg cramps?
These are the ones I see most in practice:
- Statins like Zocor, Lipitor and Crestor, by far the most common. Muscle aches, joint aches and leg cramps are common side effects.
- Forteo or Evista, used for osteoporosis.
- Estrogen pills like estradiol, which can also raise the risk of blood clots in the legs. In my opinion, if you optimize your hormones, use a bioidentical hormone instead.
- Non-steroidal anti-inflammatories like naproxen, Celebrex and ibuprofen.
- Calcium channel blockers like Procardia and Norvasc.
- Cipro (ciprofloxacin), which can cause problems with muscles and tendons.
- Celexa and other SSRIs.
If you think a medication is causing your cramps, talk to your doctor about lowering the dose, changing it, or weaning off.
When is a leg cramp a sign of a blood clot?
A blood clot in the leg, called a DVT, usually shows up as a cramp in one leg, not both, that gets worse the more you walk, and stays the same or gets worse over weeks. If that's you, see your doctor as soon as possible and get a venous Doppler, an ultrasound of the deep veins. A clot needs medical care because it can raise your risk of a pulmonary embolism.
Can blocked leg arteries cause cramps?
Yes. Peripheral artery disease can cause cramps in one or both legs that get worse as you walk, and cramps at night. It's more likely if you've been diabetic, smoked or used tobacco, or had high blood pressure for years. It can lead to losing toes, feet and legs. Your doctor will probably order an ankle brachial index (ABI), then possibly a special ultrasound of the leg arteries, angiography or a CTA. Some people need a stent or bypass.
What are the rarest and most serious causes?
If you've taken care of the other causes and still cramp, go back to your doctor. Some forms of cancer can mess with your electrolyte metabolism and cause cramps. So can some autoimmune diseases, and cirrhosis and other liver diseases, which may not show on routine lab work. Lumbar stenosis can also cause leg cramps, usually but not always with low back pain.
Frequently asked questions
What is the most common cause of leg cramps?
Not getting enough salt. Eat real salt to taste.
Do statins cause leg cramps?
Yes. In my experience statins are by far the most common medications behind leg cramps.
When should I see a doctor about leg cramps?
If the cramp is in one leg and gets worse as you walk, if your legs cramp when walking or at night and you have risk factors for blocked arteries, or if cramps continue after you fix salt, electrolytes, exertion and medications.
What foods help prevent leg cramps?
Real salt, small fish you eat with the bones like sardines and anchovies, foods rich in magnesium and potassium, and fatty meat and seafood for arachidonic acid.
This information is not medical advice. Work with your own doctor on your health and medications.
About Dr. Berry
Dr. Ken Berry is a board-certified family physician who has cared for over 25,000 patients in more than two decades of practice in rural Tennessee. He grew up in Hohenwald, Tennessee, and earned his MD at the University of Tennessee Health Science Center.
He is the author of the #1 bestselling Lies My Doctor Told Me and the creator of the Proper Human Diet.
He lives on a farm in Holladay, Tennessee, with his wife Neisha and their two children.