A muscle cramp is a sudden, unexpected tightening of one or more muscles. Sometimes called a charley horse, a muscle cramp can be very painful. Exercising or working hard, especially in heat, can lead to muscle cramps. Some medicines and illnesses also might cause muscle cramps.

Muscle cramps aren't usually harmful. Self-care measures can treat most muscle cramps.


Muscle cramps occur mostly in leg muscles, most often in the calf. Cramps usually last for seconds to minutes. After the cramp eases, the area might be sore for hours or days.

When to see a doctor

Muscle cramps usually go away on their own. They don't usually need medical care. However, see a health care provider for cramps that:

  • Cause severe discomfort.
  • Have leg swelling, redness or skin changes.
  • Come with muscle weakness.
  • Happen often.
  • Don't get better with self-care.

From Mayo Clinic to your inbox

Sign up for free and stay up to date on research advancements, health tips, current health topics, and expertise on managing health. Click here for an email preview.

To provide you with the most relevant and helpful information, and understand which information is beneficial, we may combine your email and website usage information with other information we have about you. If you are a Mayo Clinic patient, this could include protected health information. If we combine this information with your protected health information, we will treat all of that information as protected health information and will only use or disclose that information as set forth in our notice of privacy practices. You may opt-out of email communications at any time by clicking on the unsubscribe link in the e-mail.


A muscle cramp can happen after working a muscle too hard or straining it, losing body fluids through sweat or simply holding a position for a long time. Often, however, the cause isn't known.

Most muscle cramps are harmless. But some might be related to a medical concern, such as:

  • Not enough blood flow. A narrowing of the arteries that bring blood to the legs can cause a cramping pain in the legs and feet during exercise. These cramps usually go away soon after exercise stops.
  • Nerve compression. Pressure on the nerves in the spine also can cause cramping pain in the legs. The pain usually gets worse with walking. Walking bent slightly forward, such as when pushing a shopping cart, might ease cramping.
  • Not enough minerals. Too little potassium, calcium or magnesium in the diet can cause leg cramps. Medicines often prescribed for high blood pressure can cause increased urination, which may drain the body of these minerals.

Risk factors

Factors that might increase the risk of muscle cramps include:

  • Age. Older people lose muscle mass. Then the muscles can't work as hard and can get stressed more easily.
  • Poor conditioning. Not being in shape for an activity causes muscles to tire more easily.
  • Extreme sweating. Athletes who get tired and sweat a lot while playing sports in warm weather often get muscle cramps.
  • Pregnancy. Muscle cramps are common during pregnancy.
  • Medical issues. Having diabetes or illnesses that involve nerves, liver or thyroid can increase the risk of muscle cramps.
  • Weight. Being overweight can increase the risk of muscle cramps.


These steps might help prevent cramps:

  • Drink plenty of liquids every day. Muscles need fluids to work well. During activity, drink liquids regularly. Keep drinking water or other liquids without caffeine or alcohol after the activity.
  • Stretch your muscles. Stretch gently before and after using any muscle for a time. To avoid getting 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 sleep.

March 07, 2023
  1. Muscle cramp. American Academy of Orthopaedic Surgeons. https://orthoinfo.aaos.org/en/diseases--conditions/muscle-cramps. Accessed Nov. 2, 2022.
  2. Winkelman JW. Nocturnal leg cramps. https://www.uptodate.com/contents/search. Accessed Nov. 2, 2022.
  3. Muscle cramps. Merck Manual Professional Version. https://www.merckmanuals.com/professional/neurologic-disorders/symptoms-of-neurologic-disorders/muscle-cramps?query=muscle cramps. Accessed Nov. 2, 2022.
  4. Maughan RJ, et al. Muscle cramping during exercise: Causes, solutions, and questions remaining. Sports Medicine. 2019; doi:10.1007/s40279-019-01162-1.
  5. Coping with muscle cramps: Why you don't have to live with this common pain. American Osteopathic Association. https://osteopathic.org/what-is-osteopathic-medicine/muscle-cramp/. Accessed Nov. 2, 2022.


Products & Services