You are here
Home > MedlinePlus

MedlinePlus is a service of the National Library of Medicine (NLM), the world's largest medical library, which is part of the National Institutes of Health (NIH). It was built as an online health information resource for patients and their families and friends.

MedlinePlus presents high-quality, easy to understand, relevant health and wellness information that is trusted.

Alphabetical Listings

a b c d e f g h i j k l m
n o p q r s t u v w x y z

MedlinePlus at a Glance

  • Offers information on health topics, human genetics, medical tests, medications, dietary supplements, and healthy recipes.
  • Sourced from more than 1,600 selected organizations.
  • Provides 40,000 links to authoritative health information in English and 18,000 links to information in Spanish.
  • In 2018, 277 million users viewed MedlinePlus more than 700 million times.

Muscle Cramps

What are muscle cramps?

Muscle cramps are sudden, involuntary contractions or spasms in one or more of your muscles. They are very common and often occur after exercise. Some people get muscle cramps, especially leg cramps, at night. They can be painful, and they may last a few seconds to several minutes.

You can have a cramp in any muscle, but they happen most often in the:

  • Thighs
  • Feet
  • Hands
  • Arms
  • Abdomen
  • Area along your ribcage
What causes muscle cramps?

Causes of muscle cramps include:

  • Straining or overusing a muscle. This is the most common cause.
  • Compression of your nerves, from problems such as a spinal cord injury or a pinched nerve in the neck or back
  • Dehydration
  • Low levels of electrolytes such as magnesium, potassium, or calcium
  • Not enough blood getting to your muscles
  • Pregnancy
  • Certain medicines
  • Getting dialysis

Sometimes the cause of muscle cramps is unknown.

Who is at risk for muscle cramps?

Anyone can get muscle cramps, but they are more common in some people:

  • Older adults
  • People who are overweight
  • Athletes
  • Pregnant women
  • People with certain medical conditions, such as thyroid and nerve disorders
When do I need to see a health care provider for muscle cramps?

Muscle cramps are usually harmless, and they go away after a few minutes. But you should contact your health care provider if the cramps:

  • Are severe
  • Happen frequently
  • Don't get better with stretching and drinking enough fluids
  • Last a long time
  • Are accompanied by swelling, redness, or a feeling of warmth
  • Are accompanied by muscle weakness
What are the treatments for muscle cramps?

You usually don't need treatment for muscle cramps. You may be able to find some relief from cramps by:

  • Stretching or gently massaging the muscle
  • Applying heat when the muscle is tight and ice when the muscle is sore
  • Getting more fluids if you are dehydrated

If another medical problem is causing the cramps, treating that problem will likely help. There are medicines that providers sometimes prescribe to prevent cramps, but they are not always effective and may cause side effects. Talk to your provider about the risks and benefits of medicines.

Can muscle cramps be prevented?

To prevent muscle cramps, you can:

  • Stretch your muscles, especially before exercising. If you often get leg cramps at night, stretch your leg muscles before bed.
  • Drink plenty of liquids. If you do intense exercise or exercise in the heat, sports drinks can help you replace electrolytes.



thpxl