Leg Cramps at Night: Causes and What Stops Them: The Short Answer
A charley horse is an involuntary, painful contraction, most often in the calf, that happens when a fatigued motor neuron misfires and the muscle cannot get the signal to release. It is not usually dehydration. Risk rises with age, long sedentary days, pregnancy, certain medications (diuretics, statins), and simple muscular fatigue from exercise or a hard physical day. Most resolve with a firm stretch in under two minutes. See a doctor if cramps are frequent, one-sided and swollen, or unrelieved by stretching.
Complete
Endurance 360
- Chronic Lactic Acid Buffering
- ATP & Cellular Saturation
- Cordyceps & Adaptogen Matrix

It is 3am and your calf locks into a fist. You are awake instantly, standing on the cold floor because that is the only thing that helps, waiting for a muscle you did not consciously control to let go of you.
If that sentence just made your calf twitch in sympathy, you already know what a charley horse is. What you probably do not know is why it happens, and the honest answer is not the one most sites give you.
Medical disclaimer: These statements have not been evaluated by the Food and Drug Administration. This article is educational and is not medical advice. If cramps are frequent, severe, or unexplained, talk to a physician before changing anything based on what you read here.
What Is a Charley Horse, Actually?
A charley horse is an involuntary, painful contraction of a skeletal muscle, most often the calf, that the muscle cannot voluntarily release. It happens when the motor neuron controlling the muscle is too fatigued to send a clean signal, so instead of one contract-and-relax instruction, it fires a rapid, disorganized burst that locks the fibers into a spasm. The muscle is not injured. It is stuck.
That fatigue-signaling mechanism, not a lack of water, is the piece most cramp advice skips.
How It Works
What actually happens in the 10 to 90 seconds a charley horse lasts.
The Motor Neuron Fatigues
Builds over hoursA long day on your feet, a hard workout, or simply hours without moving leaves the nerve controlling the muscle unable to fire cleanly.
The Signal Misfires
The trigger momentInstead of one contract-then-release instruction, the fatigued neuron sends a rapid, disorganized burst of signals.
The Muscle Locks Up
0 to 30 secFibers receive the confused signal as sustained instructions to contract and cannot get a release signal through. This is the charley horse.
The Spasm Peaks
30 to 90 secBlood flow to the contracted fibers drops further, which is why the cramp often intensifies before it eases.
A Stretch Breaks The Loop
ReliefFirmly lengthening the muscle sends new sensory signals up the same nerve pathway, which interrupts the misfire faster than waiting it out.
That is also why the standard advice, stand up and stretch the calf hard, actually works: you are not stretching out cramped tissue so much as interrupting a nerve signal that got stuck in a loop.
What Causes a Charley Horse at Night?
Night cramps cluster around anything that fatigues a muscle or disrupts its signaling: age, a sedentary day, pregnancy, certain medications, and exercise all raise risk through the same mechanism above. No single cause explains most cases, which is why "just drink more water" fails so often.
| Risk factor | Why it raises cramp risk |
|---|---|
| Age 50+ | Motor neurons lose some of the fine control that prevents a fatigued muscle from misfiring |
| A long sedentary day | Muscles that barely moved all day can still cramp at night; inactivity itself is a risk factor, not just overuse |
| Pregnancy | Especially the second and third trimester; the mechanism is not fully settled, but the association is well documented |
| Diuretics, statins, and some asthma medications | Can alter fluid balance or muscle metabolism in ways that lower the threshold for a misfire |
| Exercise, especially unfamiliar or high-volume | Direct neuromuscular fatigue, the same mechanism, from a different cause |
| Sitting or sleeping with toes pointed | Shortens the calf muscle for hours, which some research links to nighttime onset |
Genuine dehydration and low sodium can also trigger cramping, and they deserve their due. But treating every charley horse as a hydration problem is why so many people drink more water for months and keep waking up at 3am.
When Should You Worry About a Charley Horse?
Most charley horses are harmless and resolve in under two minutes. See a doctor if cramps happen most nights, involve one leg with swelling or redness, do not ease with stretching, or come with numbness or weakness. Those patterns can point to a circulation problem, a nerve issue, or a medication side effect rather than ordinary muscle fatigue.
- Frequent: cramping most nights of the week, not an occasional bad night
- One-sided with swelling: possible sign of a blood clot, which needs same-day medical attention
- Unrelieved by a firm stretch: ordinary charley horses respond to stretching; one that does not is worth a call to your doctor
- Accompanied by numbness, weakness, or muscle wasting: can point to a nerve or circulation issue beyond simple cramping
If none of those apply, what follows is what actually helps with the ordinary kind.
Does Magnesium Stop Night Leg Cramps?
For cramping driven by genuine mineral depletion, magnesium has real evidence behind it: 300 to 400mg of elemental magnesium daily, taken as glycinate or malate, is the commonly cited target for reducing nocturnal cramp frequency. If you sweat heavily, take a diuretic, or eat a diet low in magnesium-rich foods, this is worth trying on its own merits.
It is also not what Endurance360 is for, and we would rather tell you that directly than let you assume otherwise because you found this on a supplement company's blog. E360's label carries one mineral, 20mg of calcium; magnesium stearate appears only as a tableting excipient, not a dosed ingredient. If depletion is genuinely your problem, a real magnesium supplement is the honest fix, not ours.
Which Deficiency Causes Leg Cramps at Night?
No single deficiency explains most night cramps, and that is the honest answer the supplement aisle avoids. Magnesium, potassium, and calcium depletion can all provoke cramping, but controlled trials in people who are not actually deficient show little to no benefit from supplementing. Correcting a real, measured deficiency helps; taking minerals speculatively usually does not.
| Mineral | When it plausibly matters | When it will not help |
|---|---|---|
| Magnesium | Confirmed low intake, heavy sweating, diuretic use | Normal levels; trials in older adults show minimal effect |
| Potassium | Heavy sweat losses, low dietary intake, some medications | Normal levels; excess carries its own risks |
| Calcium | Documented deficiency, certain medical conditions | Routine supplementation without a deficiency |
| Sodium | Large sweat losses during long or hot efforts | Sedentary night cramps with no sweat loss |
The practical order of operations is a blood panel first, diet second, supplement third. That sequence is unglamorous and it is why most people who buy a cramp supplement on a hunch see nothing change.
What to Eat and Drink to Stop Leg Cramps
No food or drink reliably stops a cramp that is already happening; a firm stretch does that in under two minutes. What food and drink can do is reduce how often cramps start, by closing genuine dietary gaps in magnesium, potassium, and sodium rather than by any acute effect.
- Potassium-dense foods: potatoes with skin, beans, leafy greens, bananas (the banana is the most famous and not the strongest source)
- Magnesium-dense foods: pumpkin seeds, almonds, black beans, dark chocolate
- Sodium: relevant if you sweat heavily during the day, largely irrelevant for a sedentary night cramp
- Fluid before bed: helps only if you are genuinely underhydrated, and drinking more than that just wakes you up
Does pickle juice work? There is real evidence here, and the mechanism is not electrolytes. Small trials show pickle juice shortens cramp duration faster than the sodium could possibly be absorbed, which points at a reflex triggered by the sour taste in the throat interrupting the misfiring nerve signal. It is not a nightly preventative, but it is not folklore either.
Does Tonic Water Help Leg Cramps?
Tonic water does not contain enough quinine to treat cramps. A liter carries roughly 20 mg of quinine, while the doses once prescribed for cramps ran 200 to 300 mg, ten to fifteen times higher. You would have to drink several liters a night to approach a therapeutic dose, which brings its own obvious problems.
The more important part: the US Food and Drug Administration has warned against using prescription quinine off-label for leg cramps at all, because of serious blood-related side effects including thrombocytopenia. The remedy became folklore in an era when quinine was routinely prescribed for cramps; that practice was rolled back for safety reasons, not because it stopped being fashionable. A nightly tonic water is very unlikely to hurt you at 20 mg per liter. It is also very unlikely to be what fixes your cramps.
Calf, Thigh, or Shin: Does Location Change the Cause?
The calf is the most common site because it is the muscle most likely to be held in a shortened position for hours while you sleep with your toes pointed. Inner thigh and shin cramps are less common and usually point at the same fatigue-and-signaling mechanism acting on whichever muscle spent the day working hardest or resting shortest.
- Calf cramps respond best to the toes-toward-shin stretch, and to not sleeping with tightly tucked sheets that force the foot into a pointed position
- Inner thigh (adductor) cramps are common after lateral sports and long driving, both of which hold the adductors short
- Shin cramps often follow a large jump in walking or running volume, and frequently accompany tight calves rather than existing on their own
Location is a useful clue about which muscle to stretch, not a signal of a different underlying disease. The exception is the warning list above: one-sided, swollen, hot, or persistently painful is a vascular question, not a cramp question, and belongs with a doctor rather than a stretch.
The Overlooked Cause: A Muscle Too Fatigued to Relax
The mechanism in the timeline above, a fatigued motor neuron losing clean control of the muscle, is a separate problem from mineral depletion, and it is the one most cramp content skips entirely. It explains why some people cramp badly despite perfect hydration and electrolyte intake: their legs are simply worked harder than their neuromuscular system currently recovers from.
Two ingredients have real evidence for supporting that side of the equation, and they happen to be the two E360 has built its formula around since it launched in October 2010, fifteen years before creatine became a mainstream wellness topic:
- Beta-alanine raises muscle carnosine, which buffers the acid buildup that accelerates fatigue signaling during sustained effort.
- Creatine monohydrate speeds ATP regeneration, the energy system a fatigued motor neuron is running short on in the first place.
Here is the part worth being precise about, since the popular belief runs backwards: creatine has a reputation for causing cramps, and the controlled research says the opposite. Studies on creatine supplementation show reduced cramping and muscle injury rates, not increased. The myth traces back to uncontrolled reports from the 1990s, when large 20 to 25 gram loading doses caused gastrointestinal discomfort that likely got misreported as cramping. Modern dosing does not use those doses. More on the mechanism in creatine for endurance and recovery.
That combination is also the most common thing our own customers report back to us. One review on the Endurance360 product page reads: "Since I started using Endurance360 every day I have been free from leg cramps at night after long hard rides and races. That is the most noticeable benefit for me." That is one customer's experience, not a clinical claim, and it lines up with a demanding physical routine rather than dehydration.
To be as direct as the magnesium section above: Endurance360 is not an electrolyte product, and it will not fix a cramp that is genuinely caused by mineral depletion. What it targets is the fatigue side, beta-alanine and creatine, supporting a muscle that is worked hard enough to lose clean signaling before it gets there. If your days are physically demanding, whether that is training, a job on your feet, or a stretch of bad sleep and long hours, that is the mechanism worth addressing.
For Endurance Athletes: When Training Load Is the Cause
If you got here from a hard ride or run rather than an ordinary day, the mechanism is the same but the fix is more specific to training volume, sweat rate, and race-day electrolyte math. I learned this one the hard way after a century ride a few seasons back: I finished strong, hydrated and fueled the whole way, and still spent the next three hours waking up every 45 minutes to a locked-up calf. It was not a fluid problem. My legs were simply more fatigued than my nutrition plan accounted for. I have gone deep on that exact version of this problem in the full supplement protocol for endurance athletes, and built a free calculator that scores whether your risk is electrolyte-driven or fatigue-driven and gives you a personalized sodium target either way.
Frequently Asked Questions
What is a charley horse?
A charley horse is an involuntary, painful muscle contraction, most commonly in the calf, that the muscle cannot voluntarily release. It happens when a fatigued motor neuron sends a disorganized signal instead of a clean contract-and-release instruction, locking the fibers into a spasm for roughly 10 to 90 seconds.
What causes a charley horse at night specifically?
Nighttime clustering is common because several risk factors compound overnight: a full day of fatigue accumulation, hours of stillness, and for some people, sleeping with toes pointed, which shortens the calf. Age over 50, pregnancy, certain medications, and exercise-related fatigue are the other major contributors.
Does magnesium stop leg cramps?
For cramps caused by genuine mineral depletion, yes, 300 to 400mg of elemental magnesium daily has real evidence behind it. It will not help a cramp caused by neuromuscular fatigue rather than depletion, which is a large share of cases and is not addressed by minerals at all.
Does creatine cause muscle cramps?
No, and the evidence points the opposite direction. Controlled studies associate creatine supplementation with reduced cramping and muscle injury rates. The myth originated in uncontrolled 1990s reports where large loading doses caused GI discomfort that was likely misreported as cramping.
Is a charley horse the same as restless leg syndrome?
No. A charley horse is a brief, painful, involuntary contraction. Restless leg syndrome is an uncomfortable urge to move the legs, usually without a true muscle spasm, that eases with movement and tends to recur nightly over long periods. They can both disrupt sleep, but they are different conditions with different management.
How do I stop a charley horse immediately?
Stand up if you can and firmly stretch the affected muscle, for a calf cramp that means pulling your toes up toward your shin while keeping the leg straight. The stretch works by interrupting the misfiring nerve signal, not by releasing lactic acid or replacing fluid, which is why relief is usually immediate rather than gradual.
The Bottom Line
A charley horse is your nervous system losing clean control of a tired muscle, not automatically a sign you forgot to drink water. Genuine dehydration and mineral depletion are real and worth ruling out, particularly if you sweat heavily or take a diuretic. But if your days are physically demanding, whether from training, work, or simply not enough recovery, the fatigue side of the equation deserves equal attention, and it is the side most cramp advice never mentions.
Technical FAQ Extension
What is a charley horse?
A charley horse is an involuntary, painful muscle contraction, most commonly in the calf, that the muscle cannot voluntarily release. It happens when a fatigued motor neuron sends a disorganized signal instead of a clean contract-and-release instruction, locking the fibers into a spasm for roughly 10 to 90 seconds.
What causes a charley horse at night specifically?
Nighttime clustering is common because several risk factors compound overnight: a full day of fatigue accumulation, hours of stillness, and for some people, sleeping with toes pointed, which shortens the calf. Age over 50, pregnancy, certain medications, and exercise-related fatigue are the other major contributors.
Does magnesium stop leg cramps?
For cramps caused by genuine mineral depletion, yes, 300 to 400mg of elemental magnesium daily has real evidence behind it. It will not help a cramp caused by neuromuscular fatigue rather than depletion, which is a large share of cases and is not addressed by minerals at all.
Does creatine cause muscle cramps?
No, and the evidence points the opposite direction. Controlled studies associate creatine supplementation with reduced cramping and muscle injury rates. The myth originated in uncontrolled 1990s reports where large loading doses caused GI discomfort that was likely misreported as cramping.
Is a charley horse the same as restless leg syndrome?
No. A charley horse is a brief, painful, involuntary contraction. Restless leg syndrome is an uncomfortable urge to move the legs, usually without a true muscle spasm, that eases with movement and tends to recur nightly over long periods. They can both disrupt sleep, but they are different conditions with different management.
What deficiency causes leg cramps at night?
No single deficiency explains most night cramps. Magnesium, potassium, and calcium depletion can each provoke cramping, but controlled trials in people who are not actually deficient show little to no benefit from supplementing. Correcting a measured deficiency helps; taking minerals speculatively usually does not, which is why a blood panel should come before a supplement.
Does tonic water help leg cramps?
Not meaningfully. A liter of tonic water carries roughly 20 mg of quinine, while the doses once prescribed for cramps ran 200 to 300 mg. The FDA has also warned against off-label prescription quinine for leg cramps because of serious blood-related side effects. Tonic water at that concentration is unlikely to harm you and equally unlikely to be what fixes your cramps.
What can I drink before bed to prevent leg cramps?
Nothing reliably prevents them by itself. Extra fluid helps only if you are genuinely underhydrated, and drinking more than that mostly wakes you up. Pickle juice has real evidence for shortening a cramp already in progress, apparently through a reflex triggered by the sour taste rather than through electrolytes, but it is not a nightly preventative.
How do I stop a charley horse immediately?
Stand up if you can and firmly stretch the affected muscle, for a calf cramp that means pulling your toes up toward your shin while keeping the leg straight. The stretch works by interrupting the misfiring nerve signal, not by releasing lactic acid or replacing fluid, which is why relief is usually immediate rather than gradual.
Continue reading
Related Articles

Jun 3, 2026
Stop Leg Cramps: Supplement Protocol & Risk Calculator
Leg cramps have two causes: electrolyte depletion and neuromuscular fatigue. Score yours with the free calculator, then load the 5 supplements that fix both.

Aug 17, 2026
Best Supplements for Lactic Acid: What Actually Works
Ranked by evidence: beta-alanine, sodium bicarbonate, and exogenous lactate salts, plus the physiology mistake most lactic acid products are built on.

Jul 16, 2026
Creatine and Brain Fog: What the Research Shows
Creatine's cognitive effect is real but narrow: modest in rested adults, larger in the sleep-deprived, vegetarians, and menopausal women.
Complete
Endurance 360
- Chronic Lactic Acid Buffering
- ATP & Cellular Saturation
- Cordyceps & Adaptogen Matrix

*Technical citations and PubMed references are provided for performance education only. These statements have not been evaluated by the FDA.
