Types

Muscle Spasm

Choose a preferred language


A muscle spasm (also called a cramp) is an involuntary muscle contraction. The muscle or muscle group tightens quickly and strongly. A hard lump may form in the muscle. Muscle spasms can be very painful. Here's how to treat and prevent muscle spasms.

Outline of right lower leg, showing spasm in calf muscle.


What causes muscles to spasm?

Often, the cause of a muscle spasm is not known. Muscle spasm is caused by irritation of muscle fibers. Some things can make a muscle spasm more likely. These include:

  • Injury.
  • Heavy exercise.
  • Overtired muscles.
  • A muscle held in one position for a long time.
  • Dehydration.
  • Low levels of certain minerals in the body.
  • Certain medicines, such as water pills (diuretics).
  • Certain health conditions, such as kidney failure or diabetes.
  • Pregnancy.


Stopping a muscle spasm

Muscle spasms often come and go quickly. When a muscle goes into spasm, very gently stretch and massage the muscle. This may help calm the muscle fibers. Then rest the muscle.


Preventing muscle spasms

There is little or no evidence that staying hydrated, taking certain vitamins or minerals, or stretching works to prevent cramps. But these measures may still help and have other benefits. Talk to your doctor about steps to take to prevent muscle spasms. Try to:

  • Drink enough fluids to prevent dehydration, especially when you exercise.
  • Take vitamin or mineral supplements.
  • Get regular exercise.
  • Stretch regularly, especially before exercise.
  • Limit caffeine.
  • Limit smoking, vaping, and using other nicotine or tobacco products.
  • Take a prescription muscle relaxant if prescribed by your doctor.


When to contact your doctor

Contact your doctor if you have:

  • Severe cramping.
  • Cramping that lasts a long time, does not go away with stretching, or keeps coming back.
  • Pain, tingling, or weakness in the arms or legs.
  • Pain that wakes you up at night.

Online Medical Reviewer: L Renee Watson MSN RN

Online Medical Reviewer: Raymond Turley Jr PA-C

Online Medical Reviewer: Thomas N Joseph MD

Date Last Reviewed: 02/01/2024

© 2000-2026 The StayWell Company, LLC. All rights reserved. This information is not intended as a substitute for professional medical care. Always follow your healthcare professional's instructions.
Suitcase Icon

Learn More About Health Services at PIH Health

Expert care for every stage of life. Explore the comprehensive services offered at PIH Health.

Explore Services
Newspaper Icon

Get Health Tips & Updates

Sign up for helpful health information, wellness tips and news from PIH Health, delivered straight to your inbox.

Subscribe
Related Articles
Read article
Orthopedics
Baker’s Cyst

You have a Baker's cyst. This is a lump in the back of your knee that is caused when extra joint fluid flows into a small sac behind the knee.

Read article
Orthopedics
Shoulder Dislocation

A dislocated shoulder means the upper arm bone (humerus) has moved out of the shoulder joint. It can cause pain, swelling, numbness and trouble moving the shoulder.

Read article
Orthopedics
Fluid on the Knee

Fluid on the knee is also called knee effusion. Learn how to care for yourself at home as you heal.

Read article
Orthopedics
Open Toe Fracture

A toe fracture causes local pain, swelling, and bruising. A nearby open injury, such as a cut, puncture, or deep scrape, increases the risk of infection in the skin and bone. Antibiotics are used to lower the risk of infection.

Stethoscope Icon

Personalized Care Starts with the Right Provider

Search by specialty, location, and more.

Find A Doctor
Appointments Icon

Make an Appointment

Your health can't always wait. Schedule an appointment with a PIH Health provider.

Schedule an Appointment
Cross Icon

Find a PIH Health Urgent Care Location

Need care today?. Find the nearest PIH Health Urgent Care location.

Find Urgent Care