Skip to content
Exercise
EN
Français English Español
Updated

What causes muscle cramps?

A muscle cramp usually comes from a tired muscle whose nerves misfire: the spinal cord fires off bursts of signals the brain never sent. Lack of water or salt matters less than people think: among 210 Ironman triathletes, the 43 who cramped were no more dehydrated than the others and had no lower blood sodium (Schwellnus, 2011).

Simplified diagram of an adult calf. Nerve signals, contraction, brake and pain shown as relative levels: all the curves are estimates (dashed).

What causes muscle cramps?

right leg, side view Close-up: one calf fiber myosin, actin, calcium, Z discs Signals to the muscle last 8 seconds Golgi brakepain (illustrative) each golden line = one motor nerve signal relative levels, illustrative diagram
Stagerest
Signals to the muscle0 out of 100
Golgi organ brake0 out of 100
Crampnone

A cramp is a contraction you don't control. Tap part of the drawing to see it alone.

Situation

Playback

Keyboard: 1 to 4 the situation, Space pause, L slow motion, ← → half a second back or forward, Esc show everything.

Sources: contraction, calcium and filaments (StatPearls, Pham and Puckett, 2023). Neuromuscular hypothesis (Schwellnus, Br J Sports Med, 2009). Cramp calmed by the tendon's nerves (Khan and Burne, J Neurophysiol, 2007). Triathletes: not more dehydrated, not lower in salt (Schwellnus, 2011). Leg cramps, mostly at night: 50% of 365 patients aged 65 and older (Abdulla, 1999), 58% of 205 women in the third trimester (Abandeh, 2024). Signal frequency, brake and pain: illustrative levels.

Frequently asked questions about muscle cramps

Why do you get cramps at night?

Night cramps usually have no clear cause: the leading idea is a calf that stays shortened, with the foot pointed under the blanket. In the lab, squeezing a muscle that is already shortened is the easiest way to trigger a cramp (Khan and Burne, 2007). They are common: half of 365 patients aged 65 and older at a clinic had leg cramps, most often at night (Abdulla, 1999). Pregnancy, some medications, and blood vessel or nerve diseases also make them more likely (Allen and Kirby, 2012).

Does magnesium work for cramps?

Magnesium does not work for cramps in older adults, according to a Cochrane review: 0.18 fewer cramps per week than a placebo, a difference that means nothing in practice (5 studies, 307 people, Garrison, 2020). In pregnancy, the results contradict each other. For exercise cramps, the review found no trials at all. A true magnesium deficiency, found by a blood test, is a different situation: that one can make cramps more likely (MSD Manual).

What should you do during a calf cramp (charley horse)?

During a calf cramp, or charley horse, stretch the muscle: keep the leg straight and pull your toes toward you, or stand up and put your foot flat on the floor. Stretching pulls on the tendon, whose sensors brake the signals that lock up the muscle (Khan and Burne, 2007). A cramp lasts from a few seconds to 10 minutes (NHS). Massage helps too. Pain relievers act too late for the cramp itself, but can ease the soreness that follows.

Do cramps come from a lack of water or salt?

Most of the time, cramps do not come from a lack of water or salt: among 210 Ironman triathletes, the 43 who cramped were no more dehydrated than the others and had no lower blood sodium (Schwellnus, 2011). What they shared: a faster race, with similar training, and a history of cramps. Fatigue of the muscle and its nerves is the best-supported explanation. Salt can matter in some cases, as a small study of 10 men suggests (Lau, 2021).

When should you worry about a cramp?

See a doctor if a cramp lasts more than 10 minutes, keeps coming back to the point of disturbing your sleep, or comes with swelling or numbness in the leg (NHS). See a doctor promptly for sudden weakness or loss of feeling, cramps after heavy fluid loss (vomiting, diarrhea), or cramps in the arms or trunk (MSD Manual). Muscle pain after starting a medication, a statin for example, is also worth asking about, without stopping the treatment on your own.

True or false?

A cramp starts in the muscle itself.

False. In 8 out of 13 volunteers who had a calf cramp triggered, the electrodes showed electrical activity coming from the spinal cord, with no voluntary command (Khan and Burne, 2007).

Your calf can stay sore after a cramp.

True. Discomfort or pain can last up to 24 hours after the cramp (NHS).

Quinine is a good remedy for leg cramps.

False. It reduces cramps a little but can cause serious side effects: the American Academy of Neurology advises against routine use (Katzberg, 2010). In France, it is limited to stubborn night cramps (ANSM, 2012).

This page as text

The same information as the charts, to read without animation: for each chart, the values at the main moments, then the notes with their level of evidence.

How does a muscle contract, then relax?

You push up onto the ball of your foot for 30 seconds, then let go. The nerve gives the order, calcium triggers the contraction, the filaments slide; when you relax, the calcium is pumped back.

Values read from the chart, from 0 (bottom) to 100 (top): relative heights, not measurements.
SecondsMotor nerve signals (dotted)Calcium released in the fiber (dotted)Muscle contraction (dotted)What happens
0 s253muscle at rest
15 s517061the calf contracts
30 s527062the calf contracts
45 s264the calf is relaxed
60 s253the calf is relaxed
75 s253the calf is relaxed
90 s253the calf is relaxed

Key points

What happens during a cramp?

End of a run, tired calf: at 20 seconds, the cramp (a charley horse) hits. If you do nothing, here it eases on its own after about 50 seconds (a length chosen for the example).

Values read from the chart, from 0 (bottom) to 100 (top): relative heights, not measurements.
SecondsMotor nerve signals (dotted)Muscle contraction (dotted)Pain (dotted)Golgi organ brake (dotted)What happens
0 s3530040end of the workout, the muscle tires
15 s4032022end of the workout, the muscle tires
30 s951008520cramp under way
45 s94998521cramp under way
60 s90968524cramp under way
75 s26305027the cramp has eased
90 s552530the cramp has eased

Key points

Why does stretching the muscle help?

Same cramp, but at 30 seconds you pull your toes toward you. The tendon tightens, the Golgi organ switches on and brakes the signals: the cramp eases within a few seconds.

Values read from the chart, from 0 (bottom) to 100 (top): relative heights, not measurements.
SecondsMotor nerve signals (dotted)Muscle contraction (dotted)Pain (dotted)Golgi organ brake (dotted)What happens
0 s3530040end of the workout
15 s4032022end of the workout
30 s92988540stretching
45 s792458stretching
60 s561628the muscle is relaxed
75 s551326the muscle is relaxed
90 s551225the muscle is relaxed

Key points

With care: this site informs, it does not replace medical advice. A cramp that lasts more than 10 minutes, keeps coming back to the point of disturbing your sleep, or comes with swelling, numbness or weakness in the leg is worth a visit to a doctor. Don't take quinine without medical advice: its side effects can be serious.
Cite this page

To cite this page in a paper, an article or a presentation:

Metabolive. "What causes muscle cramps?" Updated October 29, 2026. https://metabolive.com/en/effort-stress/muscle-cramps.

Embed this chart

To show this animated chart on your site, paste this code into your page. The link to Metabolive stays visible under the chart.

<iframe src="https://metabolive.com/en/embed/muscle-cramps" width="100%" height="720" style="border:0" title="What causes muscle cramps?" loading="lazy"></iframe>