Skip to Content
Looking to save on your medications?  Find out how 

Muscle cramp

A muscle cramp is a sudden and involuntary contraction of one or more of your muscles. If you've ever been awakened in the night or stopped in your tracks by a sudden charley horse, you know that muscle cramps can cause severe pain. Though generally harmless, muscle cramps can make it temporarily impossible to use the affected muscle.

Long periods of exercise or physical labor, particularly in hot weather, can lead to muscle cramps. Some medications and certain medical conditions also may cause muscle cramps. You usually can treat muscle cramps at home with self-care measures.

Symptoms

Most muscle cramps develop in the leg muscles, particularly in the calf. Besides the sudden, sharp pain, you might also feel or see a hard lump of muscle tissue beneath your skin.

When to see a doctor

Muscle cramps usually disappear on their own and are rarely serious enough to require medical care. However, see your doctor if your cramps:

  • Cause severe discomfort
  • Are associated with leg swelling, redness or skin changes
  • Are associated with muscle weakness
  • Happen frequently
  • Don't improve with self-care
  • Aren't associated with an obvious cause, such as strenuous exercise

Causes

Overuse of a muscle, dehydration, muscle strain or simply holding a position for a prolonged period can cause a muscle cramp. In many cases, however, the cause isn't known.

Although most muscle cramps are harmless, some may be related to an underlying medical condition, such as:

  • Inadequate blood supply. Narrowing of the arteries that deliver blood to your legs (arteriosclerosis of the extremities) can produce cramp-like pain in your legs and feet while you're exercising. These cramps usually go away soon after you stop exercising.
  • Nerve compression. Compression of nerves in your spine (lumbar stenosis) also can produce cramp-like pain in your legs. The pain usually worsens the longer you walk. Walking in a slightly flexed position — such as you would use when pushing a shopping cart ahead of you — may improve or delay the onset of your symptoms.
  • Mineral depletion. Too little potassium, calcium or magnesium in your diet can contribute to leg cramps. Diuretics — medications often prescribed for high blood pressure — also can deplete these minerals.

Risk factors

Factors that might increase your risk of muscle cramps include:

  • Age. Older people lose muscle mass, so the remaining muscle can get overstressed more easily.
  • Dehydration. Athletes who become fatigued and dehydrated while participating in warm-weather sports frequently develop muscle cramps.
  • Pregnancy. Muscle cramps also are common during pregnancy.
  • Medical conditions. You might be at higher risk of muscle cramps if you have diabetes, or nerve, liver or thyroid disorders.

Prevention

These steps may help prevent cramps:

  • Avoid dehydration. Drink plenty of liquids every day. The amount depends on what you eat, your sex, your level of activity, the weather, your health, your age and medications you take. Fluids help your muscles contract and relax and keep muscle cells hydrated and less irritable. During activity, replenish fluids at regular intervals, and continue drinking water or other fluids after you're finished.
  • Stretch your muscles. Stretch before and after you use any muscle for an extended period. If you tend to have leg cramps at night, stretch before bedtime. Light exercise, such as riding a stationary bicycle for a few minutes before bedtime, also may help prevent cramps while you're sleeping.

Treatment

You can usually treat muscle cramps with self-care measures. Your doctor can show you stretching exercises that can help you reduce your chances of getting muscle cramps. Making sure you stay well-hydrated also can help. For recurrent cramps that disturb your sleep, your doctor might prescribe a medication to relax your muscles.

Lifestyle and home remedies

If you have a cramp, these actions may provide relief:

  • Stretch and massage. Stretch the cramped muscle and gently rub it to help it relax. For a calf cramp, put your weight on your cramped leg and bend your knee slightly. If you're unable to stand, sit on the floor or in a chair with your affected leg extended.

    Try pulling the top of your foot on the affected side toward your head while your leg remains in a straightened position. This will also help ease a back thigh (hamstring) cramp. For a front thigh (quadriceps) cramp, use a chair to steady yourself and try pulling your foot on the affected side up toward your buttock.

  • Apply heat or cold. Use a warm towel or heating pad on tense or tight muscles. Taking a warm bath or directing the stream of a hot shower onto the cramped muscle also can help. Alternatively, massaging the cramped muscle with ice may relieve pain.
Calf stretch

While holding on to a chair, keep one leg back with your knee straight and your heel flat on the floor. Slowly bend your elbows and front knee and move your hips forward until you feel a stretch in your calf. Hold this position for 30 to 60 seconds. Switch leg positions and repeat with your other leg.

Alternative medicine

Some suggest taking vitamin B complex supplements to help manage leg cramps. However, more research is needed to confirm this benefit.

Preparing for an appointment

Make an appointment with your doctor if you have muscle cramps that are severe, frequent and not getting better with self-care.

Here's some information to help you get ready for your appointment.

What you can do

When you make your appointment, ask if there's anything you need to do in advance. Make a list of:

  • Your symptoms, including any that seem unrelated to the reason for your appointment
  • Key personal information, including major stresses, recent life changes and family medical history
  • All medications, vitamins and supplements you take, including dosages
  • Questions to ask your doctor

Take a family member or friend along, if possible, to help you remember the information you receive.

For muscle cramp, some basic questions to ask your doctor include:

  • What's likely causing my cramps?
  • Are there other possible causes?
  • What tests do I need?
  • Is my condition temporary or chronic?
  • What's the best course of action?
  • What alternatives are there to the approach you're suggesting?

Don't hesitate to ask other questions.

What to expect from your doctor

Your doctor is likely to ask you questions, including:

  • When did you develop cramps?
  • How frequent and severe are your cramps?
  • Does anything typically precede your cramps, such as mild to strenuous exercise?
  • Do you ever have cramps while resting?
  • Does stretching relieve your cramps?
  • Do you have other symptoms, such as muscle weakness or numbness?
  • Have you noticed changes in your urine after exercise?

Copyright © 1998-2024 Mayo Foundation for Medical Education and Research (MFMER). All rights reserved.