We include products we think are useful for our readers. If you buy through links on this page, we may earn a small commission. Here’s our process.
Healthline only shows you brands and products that we stand behind.Our team thoroughly researches and evaluates the recommendations we make on our site. To establish that the product manufacturers addressed safety and efficacy standards, we:
- Evaluate ingredients and composition: Do they have the potential to cause harm?
- Fact-check all health claims: Do they align with the current body of scientific evidence?
- Assess the brand: Does it operate with integrity and adhere to industry best practices?
Although muscle spasms are usually short lived and aren’t serious, they can be painful. Stretching can be particularly helpful at relieving a muscle spasm. Other home treatments like massage, using ice and heat, and staying hydrated may help, too.
Muscle spasms can last anywhere from a few seconds to 15 minutes. If you experience chronic muscle cramping, you may want to see a doctor.
How muscle spasms feel
A spasm may be a twitch in the muscle or may feel tight or hard, like a knot. After the contraction stops, the muscle can feel sore and tender. Sometimes severe spasms can be incapacitating.
Specific home treatments are recommended to relieve a muscle spasm. These work for many people. But controlled studies have shown limited proof of the effectiveness of some of these remedies.
Here are some things to try:
Stretching the area that has the muscle spasm can usually help improve or stop the spasm from occurring. Below are stretches for the muscles in your calves, thighs, back, and neck.
4 stretches for calf muscle spasms
To do the first stretch:
- Lie down, stretching your leg by pointing or pulling your toes toward your head. (Pointing the toes toward you is called dorsiflexion.)
- Hold for a few seconds or until the spasm stops.
- You can also use a strap or belt looped around your foot to gently pull the top of your foot toward you.
This also works for a hamstring muscle spasm.
Other stretches to do:
- Stand and put your weight on the cramped leg, bending your knee slightly.
- Stand on your tiptoes for a few seconds.
- Lunge forward with the leg that isn’t cramped, keeping the cramped leg straight.
Stretch for thigh spasms
- Stand and hold on to a chair for balance.
- Bend your leg at the knee and reach your leg backward from the hip.
- Holding your ankle, pull your foot up behind you toward your buttock.
4 stretches for back spasms
The first and easiest way to stretch a back spasm is to walk around, which can loosen your back muscles and relieve a spasm. Walk at a slow, steady pace to loosen your back muscles.
Tennis ball stretch:
- Lie down on the floor or on a bed with a tennis ball (or another small ball) under the area with the spasm for a few minutes.
- Try to relax and breathe normally.
- Move the ball to an adjoining spot and repeat.
Foam roller stretch:
- Lie on the floor with a foam roller perpendicular to your spine.
- Move your back over the roller, up to your shoulder blades, and down to your belly button.
- Keep your arms crossed on your chest.
Exercise ball stretch:
- Sit on an exercise ball and lie back, so that your back, shoulders, and buttocks are stretched out on the ball, with your feet flat on the floor. Do this near a chair or couch so that you can hold on if you lose your balance.
- Lie stretched out for a few minutes.
Stretch for neck spasms
- While sitting or standing, circle your shoulders by rolling your shoulders forward, up, back, and down. Repeat this motion 10 times.
- Then roll your shoulders in the opposite direction by moving your shoulders back, up, forward, and down. Repeat 10 circles in this direction.
You can perform shoulder rolls anywhere, while sitting in a car, at a desk, or if you’re standing in line somewhere waiting.
Shop for stretching accessories
Stretching is great for you, and adding extras like resistance bands and foam rollers may give you faster relief from muscle spasms.
Massage can be a great way to relieve physical pain and muscle cramps.
- Gently rub the muscle that’s in spasm.
- For a persisting back spasm, try pinching the area around it hard and holding the pinch for a few minutes. You may need someone else to do the pinching if you can’t reach the area.
Treating pain and spasms with hot or cold therapy can be extremely effective.
For a persistent spasm, apply an ice pack on the muscle for 15 to 20 minutes at a time, a few times a day. Make sure to wrap the ice in a thin towel or cloth so that the ice isn’t directly on your skin.
A heating pad on the area may also be effective for 15 to 20 minutes at a time, but follow this with an ice pack. This is because while heat feels good for pain, it may worsen inflammation. Ice will calm down the inflammation.
Other heat options include a warm bath, hot shower, or a hot tub or spa if you have access to one, which can all help relax your muscles.
When you have a spasm, try drinking some water.
To help prevent spasms, make sure that you stay hydrated, especially if you’re exercising or if the weather is hot.
While recommendations for how much water you should drink vary based on things like your individual needs, activities, lifestyle, and weather, here are some amounts to go by.
Adequate amounts of water and equivalent measurements
|Women||2.7 liters||91 ounces||11 glasses|
|During pregnancy||3 liters||101 ounces||12 glasses|
|During lactation||3.8 liters||128 ounces||16 glasses|
|Men||3.7 liters||125 ounces||15 1/2 glasses|
The Food and Nutrition Board released a report in 2004 that includes general guidelines for total water intake, including the water you get from food and beverages.
The report noted that about 80 percent of the water we need can be taken in from beverages including plain water and 20 percent from foods we eat.
Some examples of light exercise include:
- jogging in place
- walking up and down a set of stairs
- riding a stationary bike for a few minutes
- using a row machine for a few minutes
- bouncing on a trampoline
While light exercise can help, moderate or intense exercise can affect your sleep, so you’ll want to avoid it right before bed.
There are several things you can take by mouth that may help with your muscle spasms:
- NSAIDs. Over-the-counter (OTC) nonsteroidal anti-inflammatory drugs (NSAIDs) often bring relief by reducing inflammation and pain.
- Pickle juice. Drinking a small amount of pickle juice reportedly relieves cramping muscles within 30 to 35 seconds. This is thought to work by restoring electrolyte balance.
- Supplements. Salt tablets, vitamin B-12, and magnesium supplements are used by some people to treat and prevent muscle spasms. It’s important to note that there’s limited evidence to show that these are effective.
- Natural muscle relaxers. Natural muscle relaxants include drinking chamomile tea, adding capsaicin to foods, and improving your sleep.
Over-the-counter pain relieving creams may help. These include products that contain lidocaine, camphor, or menthol (for example, products by Tiger Balm and Biofreeze).
Emollient gel made from curcuma longa (turmeric) and celery seed reportedly helps ease the pain and inflammation of a muscle spasm.
A 2016 review article on spasms reported an observational study with three participants who used hyperventilating at 20 to 30 breaths per minute to resolve cramps that were exercise-related.
Hyperventilation is when you breathe harder and faster than normal. If you have anxiety, hyperventilation may not be a good choice for you, as it can induce feelings of panic.
If you have a persisting muscle spasm, especially if it’s severe, your doctor may prescribe a muscle relaxant or a pain medication.
Muscle relaxants used for muscle spasms are called centrally acting skeletal muscle relaxants (SMRs), and are often only prescribed for 2- to 3-week periods.
If your muscle spasms are frequent, or if the pain is interfering with your day-to-day life, it’s a good idea to see a doctor.
If you make an appointment for muscle spasms, your doctor may:
- take a medical history
- ask you about your symptoms
- ask about your diet and any medications or supplements you’re taking
- perform a physical exam
They’ll want to rule out any other medical conditions or reasons that might be involved in your muscle spasms.
They may order imaging tests to check for possible conditions, such as a fracture, or order blood tests to look for markers for other conditions.
Your doctor may refer you for physical therapy to help you strengthen a particular set of muscles, or to get flexibility and stretching exercises.
If your spasms are prolonged and painful, they may prescribe prescription-strength solutions.
If your spasms are in your back, consider seeing a chiropractor. They may give you some targeted therapies and exercises to relieve your muscle spasms.
A professional massage therapist may also help.
The exact mechanism that causes muscle spasms isn’t certain. Common triggers include:
- muscle fatigue from exercise
- dehydration or electrolyte depletion
- low levels of calcium, magnesium, potassium, and sodium
- some medications, such as statins
- some medical conditions, such as diabetes, Parkinson’s disease, cardiovascular disease, and cirrhosis
- nerve damage
- prior injury
Most often, muscle spasms are labeled idiopathic — meaning they have no identified cause.
The evidence is mixed about the effectiveness of remedies for preventing muscle spasms.
If you’re generally healthy and have occasional muscle spasms, experts recommend:
- staying hydrated
- doing light stretching before and after you exercise
- eating a healthy diet
You may want to keep a record of when you get a muscle spasm, to see if it’s related to a particular activity. Changing that activity may help prevent future spasms.
- Do you get a back spasm after you’ve been reading in bed?
- Do your legs cramp if you’ve been sitting or standing in one place for a long time?
- Do wearing tight shoes or high heels lead to toe cramps?
- What position have you been sleeping in?
Answering these questions can help you figure out what might be triggering your muscle spasms.
Muscle spasms are usually short lived and benign. Self-treatment, particularly stretching, works for most people.
If you have spasms frequently, or if they’re very painful, see a doctor to figure out what’s triggering the spasms.