Symptoms & causes

Leg and foot cramps at night: causes, fast fixes and the nerve connection

A night cramp is a muscle locking itself into a hard, painful knot, usually in the calf or the arch of the foot. Most are harmless and give way to a stretch. Some are a clue to a medicine, to the nerves, or to the circulation in the legs.

Written by the Managing Neuropathy editorial team under the direction of Dr. Tom Biernacki, DPM, FACFAS · Clinical review pending · Last updated 16 October 2026

A man in running shoes holding his calf with both hands

The short answer. To stop a cramp, stretch the muscle: pull your toes up toward your shin, or stand with your weight on the leg and your heel down. Night cramps are common, affecting around half of adults at some point, and become more frequent with age, often with no single cause. Nerve damage, narrowed arteries, pregnancy, dialysis and some medicines make them more likely. In the US, quinine is no longer recommended for cramps, and magnesium rarely helps. Cramps that come with weakness, numbness, swelling or pain on walking need a check.

How to stop a cramp right now

  • Calf cramp: straighten your knee and pull your toes toward you, or stand up holding the bed or a sturdy chair and put your weight on the cramping leg with the heel on the floor.
  • Foot or toe cramp: pull the toes up and back toward your shin, or stand, holding on to something sturdy, and press the foot flat on the floor.
  • Then walk it off and massage the muscle. Turn a light on first if your feet are numb, because balance is worse in the dark. The muscle can stay sore for up to a day. Painkillers act too slowly to help during the cramp itself. Acetaminophen can ease the soreness afterwards; check with your doctor before taking ibuprofen or naproxen if you have kidney problems.

Cramp, restless legs or nerve pain?

What you feelLikely causeClue
A sudden, painful, hard knot in the calf or foot, lasting seconds to minutesA muscle crampEases when you stretch the muscle
An urge to move, with crawling or pulling deep in the legs, at rest in the eveningRestless legs syndromeEases while you move; no knot in the muscle
Numbness, tingling or burning in the feetPeripheral neuropathyToes and soles first; doesn’t ease with walking
Calf pain that comes on when you walk and stops when you restNarrowed leg arteries (claudication)Comes back at the same walking distance

More on the second look-alike: restless legs or neuropathy?

What causes night cramps

  • Often, nothing you can point to. Night cramps become more common with age, and lying with the toes pointed down keeps the calf muscle short, which may make it easier for it to fire into a cramp. Hard exercise and muscle fatigue play a part too.
  • Nerve damage. Cramps are more common with peripheral neuropathy, including diabetic neuropathy, and with nerve pressure from a narrowed spinal canal in the lower back.
  • Circulation. Narrowed leg arteries and vein problems are both linked to cramps.
  • Pregnancy, usually in the later months.
  • Dialysis, liver disease and some cancer treatments.
  • Medicines. The clearest links in studies are with iron sucrose infusions, raloxifene, estrogen treatments, naproxen and teriparatide, and statins and diuretics are often blamed. If the cramps started with a new medicine, ask your pharmacist, and don’t stop a prescribed medicine on your own.

Cramps are often blamed on low magnesium or potassium. For typical night cramps the evidence for that is weak, and supplements rarely help, which is why it is worth looking for one of the causes above instead.

Video: the common causes of leg cramps, and when to see a doctor, from Dr. Tom Biernacki’s Michigan Foot Doctors channel.

Preventing night cramps

  • Stretch your calves, especially before bed. Stand facing a wall, hands on it, one foot back with the heel down, and lean in. The research on stretching is mixed, but it is harmless and many people find it works.
  • Keep the covers loose over your feet, so your toes aren’t held pointing down all night.
  • Stay active in the day and break up long spells of sitting.
  • Check your medicines with a pharmacist or your doctor.
  • Don’t count on magnesium. A Cochrane review found it unlikely to give older adults meaningful protection from cramps. The evidence in pregnancy is conflicting.
  • Don’t take quinine for cramps. The FDA warns that using it for leg cramps can cause serious and life-threatening blood problems, and that the risk outweighs any benefit.

When to see a doctor

  • Cramps most nights, or they are disturbing your sleep.
  • Cramps that last longer than 10 minutes.
  • Muscle weakness, wasting or twitching as well as cramps.
  • Numbness, tingling or burning in your feet. Numb feet: the causes and the tests.
  • Calf pain that comes on when you walk and eases when you rest.
  • Swelling in your legs, or cramps that started with a new medicine.

When it is urgent

  • Get help the same day if one leg is swollen, warm, red or darker than the other, or has a throbbing ache that won’t settle, whether or not you had a cramp. That can be a blood clot (deep vein thrombosis).
  • Call 911 if leg swelling or pain comes with chest pain or sudden shortness of breath.
  • Get emergency care for a foot or leg that suddenly turns cold, pale or blue, whether or not it hurts.

Common questions

What causes leg cramps at night?

Often no single cause. Night cramps become more common with age and with muscle fatigue, and lying with the toes pointed keeps the calf short. Nerve damage, narrowed arteries, pregnancy, dialysis and some medicines make them more likely.

How do I stop a leg cramp fast?

Stretch the muscle that is cramping. For the calf, straighten your knee and pull your toes toward you, or stand on the leg with your heel down, holding on to something sturdy. For the foot, pull the toes up toward your shin. Then walk around and massage the muscle.

Can neuropathy cause leg cramps?

Yes. Cramps are more common in people with peripheral neuropathy, including diabetic neuropathy. If your cramps come with numbness, tingling or burning in the feet, have the nerves checked as well as treating the cramps.

Does magnesium help leg cramps?

For most adults, probably not. A Cochrane review concluded that magnesium is unlikely to give older adults meaningful protection from cramps, and the studies in pregnancy disagree with each other.

Is quinine safe for leg cramps?

No. In the US, the FDA warns against using quinine for leg cramps because it can cause serious and life-threatening blood problems, and the risk outweighs any benefit.

When are leg cramps serious?

When they come with muscle weakness or wasting, numbness or burning in the feet, calf pain on walking, or leg swelling. One leg that is swollen, warm, red or darker than the other, or has a throbbing ache that won’t settle, should be seen the same day, whether or not you had a cramp, because it can be a blood clot.

Related reading

Restless legs or neuropathy? · Burning feet at night · Neuropathy exercises · Magnesium for nerve pain · Numb feet · Diabetic neuropathy

Sources and further reading: Allen RE, Kirby KA, Nocturnal leg cramps, American Family Physician, 2012; NHS, Leg cramps; Garrison SR et al., Magnesium for skeletal muscle cramps, Cochrane Database of Systematic Reviews, 2020; US Food and Drug Administration, Qualaquin (quinine sulfate) prescribing information, boxed warning; NHS, Deep vein thrombosis.

This page is general education and is not a diagnosis, a treatment plan, or a substitute for care from your own clinician. Clinical review by Dr. Biernacki is pending; the review date will be shown here once complete.

For our Michigan neighbors

Cramps, numbness
or both?

When night cramps come with numb or burning feet, a foot and ankle exam checks the nerves and the circulation, which is where the useful answers usually are. Dr. Biernacki’s Michigan practice can do that, and coordinate with your primary care clinician on medicines and blood tests.

Explore Michigan appointments →

Everywhere else, take this page to your own clinician.