A charley horse in your calf happens when the muscle contracts forcefully and won’t relax. The gastrocnemius, the large muscle running down the back of your lower leg, is the most common site for these involuntary spasms. They can last anywhere from a few seconds to several minutes, and the soreness can linger for hours afterward. The underlying cause usually comes down to one of a handful of triggers: dehydration, mineral imbalances, muscle fatigue, or nerve-related issues that throw off your body’s normal signaling.
What Happens Inside the Muscle
Your muscles contract and relax based on electrical signals from motor neurons in the spinal cord. Normally, there’s a built-in balance: one set of signals tells the muscle to fire, while another set from tension-sensing structures in the tendon tells it to ease off. A charley horse occurs when that balance breaks down. The “ease off” signal weakens or disappears, and the motor neurons keep firing in a runaway loop.
Research using electrodes inserted directly into cramping calf muscles shows that motor neurons fire at significantly higher rates during a cramp than during a normal voluntary contraction, and those firing rates are far more erratic. This is why a cramp feels so different from simply flexing your calf. Your brain isn’t in control of the contraction. The neurons are essentially stuck in an excitatory feedback loop, and until something interrupts it (like stretching the muscle), the spasm continues.
Dehydration and Electrolyte Imbalances
Four minerals play direct roles in muscle and nerve function: sodium, potassium, magnesium, and calcium. When any of them drop too low, motor neurons become more excitable and more likely to fire on their own. You lose significant amounts of sodium and potassium through sweat. Unacclimatized individuals can lose between 920 and 2,300 milligrams of sodium per liter of sweat, along with 120 to 160 milligrams of potassium. If you’re exercising in heat, sweating heavily at night, or simply not drinking enough water, those losses add up quickly.
Dehydration compounds the problem by concentrating the minerals you do have left in a smaller volume of fluid, which changes the electrical environment around your nerve cells. Even mild dehydration can shift that environment enough to lower the threshold for spontaneous firing. This is one reason charley horses often strike after a long day on your feet, during or after intense exercise, or in the middle of the night after you’ve gone hours without fluids.
Why Cramps Are Worse at Night
Nocturnal leg cramps are remarkably common. Up to 33% of people over age 50 experience them, and both the frequency and severity tend to increase with age. Several factors converge while you sleep. You go hours without water, your body temperature drops slightly, and your calf muscles often rest in a shortened position (toes pointed) under the weight of blankets. That shortened position appears to be a key trigger. Researchers have found that reduced muscle length in less physically active older adults is a significant risk factor for nighttime cramps.
Other conditions linked to nocturnal cramps include chronic kidney or liver disease, varicose veins, magnesium or calcium deficiency, and general dehydration. If you’re waking up regularly with calf cramps, it’s worth looking at your fluid intake in the evening, the position of your feet while you sleep, and whether you’re getting enough magnesium and potassium from your diet.
Muscle Fatigue and Overuse
You don’t need a mineral deficiency to get a charley horse. Pure muscle fatigue is one of the most common triggers, especially during or right after exercise. When a muscle is fatigued, the inhibitory signals from the tendon weaken while the excitatory signals from the muscle spindles stay active. This creates the same imbalance that leads to uncontrolled firing.
This explains why cramps tend to hit at the end of a long run, during the final set of calf raises, or after an unusually active day. The muscle has been working hard enough that its internal feedback system starts to malfunction. Starting a new exercise routine, ramping up intensity too fast, or spending an unusual amount of time on your feet can all push the calf past its fatigue threshold.
Medications That Trigger Cramps
Certain medications make calf cramps more likely. Cholesterol-lowering statins are among the most well-known culprits. Muscle cramping, soreness, and weakness are the most commonly reported side effects of this drug class, and the risk increases with higher doses. Diuretics (water pills) can also trigger cramps by flushing sodium, potassium, and magnesium out through the kidneys faster than you replace them.
Combining a statin with a fibrate, another type of cholesterol medication, raises the risk of muscle problems further. If you started a new medication and noticed calf cramps appearing or getting worse, the timing is worth mentioning to your prescriber.
When a Cramp Might Be Something Else
Most charley horses are harmless, if painful. But two conditions can mimic or overlap with calf cramps, and both need attention.
Peripheral Artery Disease
Peripheral artery disease (PAD) causes painful cramping in the calves, thighs, or hips that starts during walking or climbing stairs and stops when you rest. The key difference from a typical charley horse is the pattern: PAD pain is predictably tied to activity and relieved by rest, and it tends to affect one leg more than the other. Other signs include cold feet, slow-growing toenails, shiny skin on the legs, hair loss on the lower legs, and sores on the feet that heal slowly. In severe cases, the cramping pain occurs even at rest or while lying down.
Deep Vein Thrombosis
A blood clot in the deep veins of the leg can feel like a sudden, persistent calf cramp. The distinguishing features are swelling in the affected leg, skin that looks red or purple, and a feeling of warmth over the painful area. Unlike a charley horse, the pain from a clot doesn’t release after stretching and doesn’t come and go in short bursts. If your “cramp” comes with visible swelling and skin color changes, that combination warrants urgent evaluation.
How to Stop and Prevent Calf Cramps
When a charley horse strikes, stretching the muscle is the most effective immediate response. Pull your toes toward your shin to lengthen the calf, either by standing and pressing your heel into the floor or by grabbing your foot and flexing it while seated. Research confirms that forcibly stretching a cramping muscle increases activity across all the surrounding muscles briefly, then breaks the contraction cycle. The cramp typically releases within 15 to 30 seconds of sustained stretch.
For prevention, the most practical steps target the triggers described above:
- Stay hydrated throughout the day, and don’t stop drinking fluids two or three hours before bed. If you sweat heavily during exercise, a drink with sodium and potassium replaces what plain water cannot.
- Eat potassium- and magnesium-rich foods regularly. Bananas, potatoes, leafy greens, nuts, and seeds cover both minerals.
- Stretch your calves before bed. A simple wall stretch or standing calf raise held for 20 to 30 seconds can keep the muscle from resting in a shortened position overnight.
- Avoid sleeping with toes pointed. Keeping a light blanket loose at the foot of the bed, or sleeping with your feet hanging off the edge, helps keep the calf in a neutral position.
- Build exercise intensity gradually. Sudden spikes in training volume or time on your feet are reliable cramp triggers.
If your cramps are frequent, happening multiple times a week, or always in the same leg, it’s worth checking your mineral levels and ruling out the vascular conditions described above. For most people, though, better hydration, a few dietary tweaks, and a nightly calf stretch are enough to make charley horses rare.

