How to Treat and Prevent Leg Cramps

Relief From Painful Muscle Spasms

In This Article

Table of Contents

A leg cramp is a sudden, uncontrolled contraction of a muscle. This type of pain is most commonly experienced in the lower extremity, and therefore often called a leg cramp or a "charley horse." Leg cramps occur when the muscle suddenly and forcefully contracts.

The most common muscles to contract in this manner are muscles that cross two joints. These muscles include the calf (crossing the ankle and knee), the hamstring (crossing the knee and hip), and the quadriceps (also crossing the knee and hip).

Tips for treating leg cramps
Illustration by JR Bee, Verywell 


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

  • Sudden, sharp pain, most often in the back of the leg
  • Contraction of the muscle
  • A quivering sensation of 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.


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

  • Muscle fatigue
  • Heavy exercising
  • Dehydration
  • Being overweight
  • Electrolyte imbalances
  • Early pregnancy

The most common cause that is typically seen in patients who develop leg cramps is exercising in an unusual way, meaning either more activity or a different exercise. Leg cramps are more common in young (adolescent age) and older (over 65) patients.

Also, some medications can cause side effects of muscle spasms, including statin drugs and corticosteroids like prednisone. There are some rare genetic conditions that can make muscle cramping more likely and more severe, although these are uncommon.

The vast majority of people who sustain a leg cramp from athletic participation require no specific tests to direct treatment.


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

  • Massaging the cramped muscle
  • Stretching
  • Cooling the skin with cold, moist cloth
  • Drinking more fluids

There are also muscle-relaxing drugs that may be prescribed if the cramping is severe. One drug commonly prescribed to treat pain associated with muscle spasms is Robax, which combines methocarbamol, a muscle relaxant, with ibuprofen, a nonsteroidal anti-inflammatory drug (NSAID). It is taken every 4 to 6 hours but generally for no longer than 5 days.

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

For the vast majority of athletes, medications should not be used as a treatment of isolated episodes of muscle cramps.

One warning sign of muscle damage is dark urine, particularly in the hours that follow an episode of severe cramping or muscle injury. If an athlete has an episode of severe muscle cramping, followed by a darkening of the urine, they should immediately seek medical evaluation. Further testing can be performed to evaluate for muscle injury.


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

  • Stay hydrated. It is not well known exactly how dehydration and muscle cramping are related, but it is known that dehydration can predispose to leg cramps. Drink at least three full glasses of water each day, including one before bedtime. Also drink plenty of fluid before, during, and after exercise.
  • Stretch regularly. Stretching can relax muscle fibers. When working out, a good post-workout stretching routine can help relax muscles and prevent cramps. Make sure you cool down after exercising and do not exercise vigorously just prior to sleep.
  • Train gradually. Gradually build up an exercise program, and try to avoid sudden increases in activity. The "10% Rule" is a good rule of thumb: never increase your exercise over one week by more than 10 percent 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 their training far too quickly.

A Word From Verywell

Most leg cramps are spontaneous, painful events that will quickly resolve. In some unusual circumstances, they can occur as part of a syndrome or as a more severe problem.

If your symptoms of leg cramps seem more frequent or more severe than is typical, you should discuss these with your doctor. There are some strategies to improve hydration and nutrition, and there are even medications that can help control symptoms of more severe leg cramps.

Was this page helpful?

Article Sources