Charley horses are caused by involuntary, forceful contractions of a muscle, most often in the calf. About 30% of American adults experience them at least five times a month, and the underlying trigger is usually a glitch in the nerve signals controlling muscle contraction rather than a single deficiency or injury. The causes range from simple muscle fatigue to electrolyte imbalances, medications, and chronic medical conditions.
How the Nerve Signal Goes Wrong
Your muscles contract and relax based on a balance of signals from two types of sensors. Muscle spindles detect stretch and tell the muscle to contract. Golgi tendon organs detect tension and tell the muscle to relax. Under normal conditions, these two systems keep each other in check. A charley horse happens when that balance tips toward contraction and stays there.
When a muscle is fatigued or held in a shortened position, the excitatory signals from muscle spindles ramp up while the inhibitory signals from Golgi tendon organs drop off. The result is sustained, involuntary firing of the motor nerve at the spinal level. This is why calf cramps so often strike at night: your foot may be pointed downward under the covers, keeping the calf muscle in a shortened position where its built-in “off switch” is less active. Muscles that cross two joints, like the calf muscle (which crosses both the knee and ankle), are especially vulnerable because they spend more time in shortened positions where that inhibitory feedback is naturally reduced.
Muscle Fatigue and Overexertion
Exercise-related charley horses are the most studied type, and fatigue is the single most consistent trigger. When you push a muscle past its conditioning level, whether through a longer run, a new workout, or physical labor you’re not used to, the nerve control system becomes less precise. The motor neurons that drive contraction become hyperexcitable, and the safety mechanisms that normally prevent a sustained spasm lose their effectiveness.
This explains why cramps tend to hit late in a game, toward the end of a long hike, or after yard work you haven’t done in months. The muscle doesn’t need to be injured. It just needs to be tired enough that its feedback loop can’t self-correct. Starting a new exercise routine gradually and building endurance over time is one of the most reliable ways to reduce cramping frequency.
Dehydration and Electrolyte Imbalances
For decades, dehydration and lost minerals were considered the primary explanation for muscle cramps. More recent evidence suggests they play a supporting role rather than a starring one, but they still matter. When you sweat heavily, especially in hot or humid conditions, you lose fluid along with sodium, potassium, magnesium, and calcium. All four of these minerals are involved in nerve transmission and muscle contraction, and running low on any of them can make your muscles more irritable and prone to spasm.
Magnesium is particularly notable because it helps regulate the electrical signals between nerves and muscles. Low magnesium levels are commonly associated with cramping, though supplementation studies have shown mixed results. Potassium and calcium deficiencies can also lower the threshold for involuntary contractions. Heat cramps, the mildest form of heat-related illness, often involve heavy sweating, fatigue, thirst, and sudden muscle spasms, illustrating how dehydration and mineral loss work together to set the stage for a charley horse.
Medications That Trigger Cramps
Several common medications increase cramping risk, and diuretics (water pills) top the list. Among blood pressure drugs, diuretics are the class most consistently linked to muscle cramps. One thiazide-type diuretic, indapamide, lists muscle cramps as a side effect occurring in 5% or more of users. When a diuretic is combined with another blood pressure medication, cramps often appear as a side effect of the combination but not of the other drug alone. This makes sense: diuretics increase fluid and mineral excretion, which can deplete the very electrolytes your muscles need.
Even potassium-sparing diuretics, which are designed to prevent potassium loss, are associated with cramping. Cholesterol-lowering statins like lovastatin and simvastatin are another well-known trigger. If you started a new medication and noticed more frequent charley horses, the timing may not be a coincidence.
Medical Conditions Linked to Cramping
Frequent or severe charley horses can be a sign of an underlying health issue. Peripheral artery disease, where narrowed arteries reduce blood flow to the legs, causes a cramping pain during exercise that eases with rest. This happens because the working muscle can’t get enough oxygen-rich blood to meet its demand. Diabetes increases cramping risk through its effects on nerve function. Thyroid disorders, liver disease, and kidney problems can all disrupt the mineral balance or nerve signaling that keeps muscles contracting normally.
Nerve compression in the spine, particularly in the lower back, can also produce calf cramps that mimic ordinary charley horses. The difference is usually in the pattern: cramps caused by nerve compression tend to worsen with prolonged walking or standing and improve when you lean forward or sit down.
Why They Hit at Night
Nocturnal leg cramps are remarkably common. In a large representative study of U.S. adults, about 24% reported mild nighttime cramps and 6% reported moderate to severe episodes occurring 15 or more times per month. Several factors converge during sleep to make cramps more likely. You’re mildly dehydrated after hours without drinking. Your foot naturally falls into a pointed position that shortens the calf. And your body’s motor control systems operate differently during sleep, with less conscious input to override a misfiring nerve signal.
Older adults experience nocturnal cramps more frequently, likely because of age-related changes in muscle mass, nerve function, and the medications they take. People who stand on hard surfaces for long periods during the day also report more nighttime episodes, probably because of accumulated muscle fatigue.
Pregnancy and Charley Horses
Leg cramps are one of the most common complaints during the second and third trimesters. The exact mechanism isn’t fully understood, but several plausible factors overlap: increased body weight puts more strain on leg muscles, blood volume changes can affect circulation, and the growing uterus can press on nerves and blood vessels supplying the legs. Mineral demands also shift during pregnancy, with the developing baby drawing heavily on calcium and magnesium stores.
How to Stop and Prevent Them
When a charley horse strikes, the most effective immediate response is to stretch the cramping muscle. For a calf cramp, flex your foot upward, pulling your toes toward your shin. This lengthens the muscle and activates the Golgi tendon organs, which send the inhibitory signal your nervous system needs to release the spasm. Gently massaging the muscle or applying heat can help it relax afterward. Some people feel residual soreness in the muscle for a day or two following a severe cramp, similar to a mild strain.
For prevention, staying well hydrated and maintaining adequate intake of potassium, magnesium, and calcium through food is a reasonable baseline. Bananas, leafy greens, nuts, dairy, and potatoes cover most of these minerals. Stretching your calves before bed, particularly if nighttime cramps are your pattern, can reduce their frequency. If you exercise, building up intensity gradually rather than jumping into hard efforts gives your neuromuscular system time to adapt. And if cramps started after a medication change, that’s worth mentioning to whoever prescribed it, since adjusting the dose or switching drugs often resolves the problem.

