
Muscle spasms or cramps are fairly common and most frequently occur in the leg muscles. But any muscles, including your back, hands, feet, or toes can spasm.
A muscle spasm is a painful, sudden tightening of muscles that occurs during physical activity. You’re more likely to have muscle spasms if your Muscle spasm diet is deficient in calcium and potassium or if you’re dehydrated. Magnesium is also important for muscle relaxation. Eating foods that contain these minerals might help reduce the occurrence of muscle spasms. Speak to your doctor if you have frequent or severe muscle spasms.
We have all had them — those painful, involuntary contractions of one or more muscles that can occur whether you’re active or sleeping. Muscle cramps can be mild or excruciating, and usually happen in the calf and feet. They can also occur in other parts of the body, like the arm or hand.
Muscle cramps are caused by overexertion and lack of stretching, poor circulation, dehydration and lack of certain nutrients. Even some medications can cause them.
Your best bet is to pay attention to exercise safety and ergonomics. Most of all, stay hydrated and eat properly.
Specific home treatments are recommended to relieve muscle spasm. These work for many people. But controlled studies have shown limited proof of the effectiveness of some of these remedies.
Relieve Muscle Spasm with Home Remedies

Exercise
Stretching
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.
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 muscle 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.
Massage
Massage can be a great way to relieve muscle spasm 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.
Ice or heat
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.
Hydration
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.
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.
Muscle Spasm Diet

Calcium-Rich Foods
Calcium is essential for relieve muscle spasm and nerve function so that muscles contract and relax properly. According to the National Institutes of Health’s Office of Dietary Supplements, most adults need 1,000 to 1,200 milligrams of calcium each day 2. Dairy products such as milk, cheese and yogurt are all high in calcium. Sardines, tofu and calcium-fortified orange juice and breakfast cereals, turnip greens and kale are also good sources of calcium.
Potassium-Rich Foods
Potassium works with calcium for normal nerve and muscle function. According to the Institute of Medicine, most adults should get 4.7 grams of potassium from foods every day. Potassium is found in a variety foods, but most Americans don’t get enough. Most fruits and vegetables are high in potassium, especially potatoes, sweet potatoes, cooked greens and bananas. Nonfat milk, yogurt, chicken and fish are also rich in potassium.
Foods High in Magnesium

Magnesium helps your muscles contract and relax. According to the Institute of Medicine, women need between 310 and 320 milligrams per day, depending on age, and men need between 400 and 420 milligrams each day. Pregnant woman need between 350 and 400 milligrams every day. Dark leafy green vegetables are the best source of magnesium.
Sodium
This substance helps maintain normal body-fluid balance, nerve impulse generation and muscle contraction. It’s not unusual for an athlete to crave salt after a workout; when the electrolyte balance is disturbed, the body will start pulling nutrients from other sources, such as salt. You can get it naturally by eating certain foods, like celery.
Water
When you’re dehydrated the electrolyte-water balance is disturbed, and that stimulates nerves. The average person loses three to four cups per day just through perspiration and urine; it just takes a loss of two percent of your body’s water to become dehydrated.
Read more Total Knee Replacement Surgery Procedure and Recovery Time