Charley horses are sudden, involuntary muscle contractions that strike most often in the calf, foot, or both. They affect 50 to 60 percent of adults, become more common with age, and are slightly more frequent in women. The causes range from simple fatigue and dehydration to underlying medical conditions, but the core trigger is always the same: your nerves fire when they shouldn’t, locking a muscle into a painful, sustained contraction.
How a Charley Horse Happens
Muscle cramps are neurogenic, meaning they originate in the nervous system rather than in the muscle tissue itself. Your muscles contract when motor neurons send electrical signals telling them to shorten. Normally, a built-in braking system keeps those signals in check. Sensors in your tendons detect tension and send inhibitory signals back to the spinal cord, essentially telling the motor neuron to ease off. When that feedback loop breaks down, the motor neuron keeps firing and the muscle stays locked in contraction.
Two things happen simultaneously during a cramp. The sensors inside the muscle that detect stretch (muscle spindles) become overexcited, ramping up the “contract” signal. At the same time, the sensors in the tendon that normally pump the brakes quiet down. The result is a motor neuron caught between a louder gas pedal and a fading brake pedal. That imbalance produces the intense, involuntary contraction you feel as a charley horse.
Muscle Fatigue and Overuse
The most common trigger for charley horses during or after physical activity is simple muscle fatigue. As a muscle tires, the delicate balance between excitatory and inhibitory nerve signals shifts. Animal research has shown that fatigue increases the firing rate of the stretch-sensing nerve fibers while simultaneously reducing the activity of the tendon sensors that would normally shut the contraction down. This is why cramps tend to hit near the end of a long run, a tough workout, or an unusually active day rather than at the beginning.
You don’t have to be an athlete. Standing on your feet all day, doing yard work you’re not used to, or suddenly increasing your exercise routine can all push a muscle past its fatigue threshold. The calf muscles are especially vulnerable because they bear your body weight and are active during walking, running, and even standing still.
Dehydration and Electrolyte Loss
Heavy sweating without adequate fluid replacement changes the concentration of your body’s fluids. As you lose water through sweat, the fluid outside your cells becomes more concentrated. This shift pulls water out of the spaces between cells and disrupts the electrical environment muscles need to contract and relax properly.
Four electrolytes play direct roles in muscle and nerve function. Sodium controls fluid balance and helps transmit nerve signals. Potassium supports the electrical activity in muscles and nerves. Calcium allows blood vessels to function and helps the nervous system send messages. Magnesium aids both nerve and muscle function. When any of these drop too low, muscle cramps, spasms, and weakness can follow. This is why charley horses often spike during hot weather, after intense exercise, or during illnesses that cause vomiting or diarrhea.
That said, recent research suggests dehydration alone may not be the primary driver of cramps. A comparison of the two leading theories found that the neuromuscular explanation, where nerve signaling goes haywire due to fatigue, holds up better than the dehydration theory in most study settings. Both factors likely contribute, but fatigue-related nerve dysfunction appears to play the bigger role.
Nighttime Cramps
Nocturnal leg cramps are the most common type, and up to 20 percent of people who get them experience symptoms frequently enough to seek medical help. They typically hit the calf or the sole of the foot and can last from a few seconds to several minutes.
The exact reason cramps favor nighttime isn’t fully settled, but several factors converge while you sleep. Your foot naturally points downward in bed, which shortens the calf muscle and may make it more prone to spontaneous contraction. You’re also not moving, so blood flow to the legs slows. If you spent the day on your feet or exercised that evening, residual muscle fatigue compounds the problem. Mild dehydration from not drinking water for several hours adds another layer of risk.
Medical Conditions That Increase Risk
Frequent charley horses can be a symptom of an underlying health issue. Several categories of conditions are linked to recurring leg cramps:
- Metabolic and endocrine conditions: Type 1 and type 2 diabetes (particularly when nerve damage is involved), chronic kidney disease, thyroid disorders (both overactive and underactive), Addison’s disease, low blood sugar, and anemia.
- Vascular conditions: Peripheral artery disease, which reduces blood flow to the legs, and high blood pressure.
- Neurological conditions: Peripheral neuropathy (nerve damage in the extremities), spinal stenosis, and Parkinson’s disease.
- Other conditions: Cirrhosis and alcohol use disorder.
Kidney failure, diabetic nerve damage, and poor circulation are among the most well-established medical causes. If your charley horses are frequent, happen in both legs, or started suddenly without an obvious explanation like exercise, an underlying condition is worth considering.
Medications That Trigger Cramps
A number of common medications list leg cramps as a side effect. Diuretics (water pills) are a classic culprit because they increase urine output and can deplete potassium and magnesium. Statins, widely prescribed for cholesterol, are another frequent offender. Certain antidepressants, anti-seizure medications, sleep aids, pain relievers, and asthma inhalers have also been linked to leg cramps. If your charley horses started or worsened after beginning a new medication, that connection is worth raising with your prescriber.
Pregnancy
Leg cramps are common during pregnancy, particularly at night during the second and third trimesters. The exact mechanism isn’t fully understood, but several factors overlap. The growing uterus puts pressure on blood vessels and nerves that serve the legs. Total blood volume increases, which can dilute electrolyte concentrations. Some research points to lower calcium levels in the blood during pregnancy as a contributing factor. The extra weight also places greater demand on calf muscles throughout the day, increasing fatigue.
Do Magnesium Supplements Help?
Magnesium is one of the most commonly recommended supplements for leg cramps, but the evidence is underwhelming. A Cochrane review combining five well-designed studies found, with moderate certainty, that magnesium is unlikely to reduce the frequency or severity of muscle cramps in older adults. The differences between magnesium and placebo groups were small, not statistically significant, and consistent across studies. No meaningful improvement was found in cramp intensity or duration either.
The one exception may be pregnancy. Although the evidence is mixed, some research suggests magnesium supplementation could help prevent leg cramps in pregnant women, possibly because their baseline mineral demands are higher.
What Actually Helps
When a charley horse strikes, the fastest relief comes from stretching the cramping muscle. For a calf cramp, flex your foot upward, pulling your toes toward your shin. You can also stand and press your heel into the floor while leaning forward. Massaging the muscle and applying heat can help it relax once the acute contraction eases.
For prevention, regular calf stretching before bed is the most consistently supported approach. Holding a wall stretch for 10 to 30 seconds, targeting both the larger calf muscle and the deeper one beneath it (by slightly bending your knee during the stretch), can reduce how often nighttime cramps occur. Staying hydrated throughout the day, especially when exercising or in hot weather, addresses the fluid and electrolyte component. Eating potassium-rich foods like bananas, potatoes, and leafy greens supports the electrical balance your muscles depend on.
If you exercise regularly, building up intensity gradually rather than in sudden jumps reduces the fatigue-driven nerve dysfunction that triggers most activity-related cramps. Wearing supportive shoes, avoiding prolonged standing in one position, and keeping bed sheets loose so they don’t push your feet into a pointed position at night are small changes that can make a noticeable difference.

