How to Treat and Prevent Leg Cramps

Get Relief From Painful Muscle Spasms

A leg cramp is a sudden, uncontrolled contraction of a muscle. This can occur elsewhere in the body, but is most commonly experienced in the lower extremities. Leg cramps or spasms are unpredictable in that they may vary in terms of intensity and duration, and come on suddenly, but they do have predictable causes that can lead prevention efforts.

Muscles that cross two joints seem to be the most common to cramp up. These include the calf (crossing the ankle and knee), the hamstring (crossing the knee and hip), and the quadriceps (also crossing the knee and hip).

A leg cramp may also be referred to as a "charley horse."

Tips for treating leg cramps
Verywell / JR Bee

Symptoms

Leg cramps usually last less than a minute but may endure for several before the contractions finally subside. Typical symptoms include:

  • Sudden, sharp pain, most often in the back of the leg
  • Uncontrollable contraction of the muscle
  • A quivering sensation in the muscle
  • Ongoing aching and fatigue following muscle relaxation

In some people, the spasms occur primarily at night and can awaken the patient from sleep. More severe leg cramps can cause pain that lasts several days after the cramp occurs.

When to See a Doctor

While leg cramps tend to resolve on their own without treatment, see your doctor if they are severe, recurrent, have no known cause, or are accompanied by swelling, changes in skin color, or muscle weakness.

Causes

The exact cause of leg cramps is not well understood, but there are some risk factors that are thought to contribute:

  • Age: Leg cramps are more common in young (adolescent age) and older (over 65) patients.
  • Muscle fatigue: Overexertion due to heavy exercising or being active in an unusual way may be to blame.
  • Dehydration: This includes electrolyte imbalances (potassium, magnesium, sodium, and calcium in particular.)
  • Being overweight
  • Early pregnancy: This could be linked to calcium changes or muscle fatigue from carrying extra weight.
  • Medical conditions: People with thyroid or nerve conditions are known to experience leg cramping.
  • Mediation use: Some medications can cause muscle spasms as a side effect, including statin drugs and corticosteroids like prednisone.

Treatment

Usually, instinct takes over when a leg cramp strikes and you massage and stretch the sore muscle. This is often solves the problem.

You may also find relief by:

  • Cooling the skin with cold, moist cloth
  • Drinking more fluids

A doctor may also prescribe muscle-relaxing drugs if cramping is severe. One drug, Robax, combines methocarbamol (a muscle relaxant) with ibuprofen (nonsteroidal anti-inflammatory drug, NSAID). Patients generally take it every four to six hours for no longer than five days.

Robax should not be taken with alcohol or other NSAIDs, and it may cause suicidal thoughts if overused. Call your doctor immediately if you have trouble urinating or experience vomiting, rash, slowed heart rate, or jaundice when on this drug.

The vast majority of people who sustain a leg cramp from athletic participation require no specific tests to direct treatment. And for the vast majority of athletes, medications should not be used to treat isolated episodes of muscle cramps.

One warning sign of dangerous muscle damage is dark urine, particularly in the hours that follow an episode of severe cramping or muscle injury. This is a symptom of rhabdomyolysis, a rare condition where injured muscle tissue dies and enters the bloodstream, eventually damaging the kidneys.

Anyone who experiences severe muscle cramping followed by a darkening of the urine should immediately seek medical attention.

Prevention

While you can't always prevent leg cramps, there are things you can do to significantly reduce their risk:

  • Stay hydrated: Dehydration is known to predispose you to leg cramps, although the exact reason why is not known. Drink at least three full glasses of water each day, including one before bedtime. Also drink plenty of fluid before, during, and after exercise.
  • Pick foods wisely: Electrolyte drinks may help keep your levels steady, but eating potassium- or magnesium-rich foods may also help. These include bananas, sweet potatoes, beans/legumes, and avocados.
  • Stretch: Stretching can relax muscle fibers. When working out, a good post-workout stretching routine may help prevent cramps. Make sure you cool down after exercising and do not exercise vigorously just prior to sleep.
  • Train gradually: Avoid sudden increases in activity. The "10% rule" is a good one: Never increase your weekly exercise load by more than 10% compared to the week before. Most athletes who have leg cramps, such as long-distance runners, tend to do so because they increased the intensity or duration of their training too quickly.

A Word From Verywell

Most leg cramps are spontaneous, painful events that quickly resolve. They can be frustrating, particularly if they occur at night and disrupt sleep. If your leg cramps seem more frequent or more severe than is typical, see your doctor.

Was this page helpful?

Article Sources

Verywell Health uses only high-quality sources, including peer-reviewed studies, to support the facts within our articles. Read our editorial policy to learn more about how we fact-check and keep our content accurate, reliable, and trustworthy.
  1. Karatzaferi C, Chase PB. Muscle fatigue and muscle weakness: what we know and what we wish we didFront Physiol. 2013;4:125. doi:10.3389/fphys.2013.00125

  2. Popkin BM, D'Anci KE, Rosenberg IH. Water, hydration, and healthNutr Rev. 2010;68(8):439–458. doi:10.1111/j.1753-4887.2010.00304.x

  3. Pinal-Fernandez I, Casal-Dominguez M, Mammen AL. Statins: pros and consMed Clin (Barc). 2018;150(10):398–402. doi:10.1016/j.medcli.2017.11.030

  4. Liu D, Ahmet A, Ward L, et al. A practical guide to the monitoring and management of the complications of systemic corticosteroid therapyAllergy Asthma Clin Immunol. 2013;9(1):30. doi:10.1186/1710-1492-9-30

Additional Reading

  • Bordoni B, Sugumar K, Varacallo M. Muscle Cramps. [Updated 2019 Jun 22]. In: StatPearls [Internet]. Treasure Island (FL): StatPearls Publishing; 2019 Jan-.

  • National Institutes of Health. Medline Plus. Rhabdomyolysis.

  • Young G. Leg cramps. BMJ Clin Evid. 2015 May 13;2015. pii: 1113.