If you had to sum up the experience of a leg cramp in a single word, "excruciating" comes to mind — a leg cramp (aka a charley horse) causes sudden, intense pain or discomfort.
There's no main cause of a charley horse. In fact: "The majority of leg cramps are idiopathic," meaning the cause is unknown, says Naimish Baxi, MD, physiatrist at the Hospital for Special Surgery.
Video of the Day
Video of the Day
Some possible factors include dehydration, leg position (think: frequently crossed legs or a funny sleeping position) and muscle fatigue. Leg cramps — whether they be in your calf, quad or inner thigh — can occur as a side effect of medications, or they may be a sign of a serious health condition, according to the Cleveland Clinic.
The good news: Leg cramps are short-lived, typically going away in seconds or minutes, says sports medicine specialist Farah Hameed, MD, assistant professor of rehabilitation and regenerative medicine at Columbia University Medical Center. If you're looking to ease the discomfort and stop the cramps immediately, these at-home remedies can help.
1. Move and Stretch
"For most people, getting up and moving is the best thing to get the muscle to stop contracting," Dr. Hameed tells LIVESTRONG.com. By standing up and walking a step or two, you'll engage the muscle in the front of your leg, helping dispel a cramp in your calf, she says.
A little light stretching may help, too, Dr. Hameed says. Try flexing your foot upward, for instance, per the Cleveland Clinic.
Just be sure to take it easy; stretching too hard, too fast, can set off more cramps, Dr. Hameed says. Aim to gradually, gently stretch the muscles.
2. Apply Heat, Then Ice
Both doctors say to try heat first.
"Heat right off the bat is most helpful," Dr. Hameed says — it helps to loosen up those contracted, tight muscles in the moment of a cramp. You can use a warm towel or heating pad, per the Mayo Clinic.
Warmth brings blood flow to the area, which brings oxygen and nutrients, helping to alleviate the contracted muscle, Dr. Baxi tells LIVESTRONG.com.
Ice is less helpful when it comes to halting a cramp. But after a cramp, you may feel like your muscles are bruised or sore, and applying ice at that point may ease that discomfort, Dr. Hameed says.
3. Take Over-the-Counter Painkillers
If you have a leg cramp, taking an over-the-counter (OTC) painkiller won't end the cramp. But a cramp can strain or irritate the muscle, leading to lingering soreness and discomfort, and OTC pain relievers can help.
Try Tylenol or a non-steroidal anti-inflammatory pain reliever like ibuprofen, Dr. Hameed says.
4. Hydrate
If cramps are due to being dehydrated, drinking — either water or a sports drink with electrolytes — may help, according to PeaceHealth.
This might not do anything to resolve a cramp as it's happening, but it can help ward off more cramps (some people get several per night), Dr. Hameed points out.
To stay hydrated, most experts recommend drinking about half your body weight in ounces each day. For example, if you weigh 150 pounds, aim for about 75 ounces, or about nine cups.
5. Eat a Banana
If the voice of your grandma is echoing in your head, with the recommendation to "just have a banana," you're not alone.
Electrolyte imbalances can cause muscle cramps. If this is the culprit behind yours, eating a banana could help boost your potassium, Dr. Hameed says. So there's some merit to eating one — or taking a supplement — as a preventive tactic if your potassium levels are low, say, due to taking a diuretic medication, per the Mayo Clinic.
But keep in mind that eating a banana won't stop a leg cramp immediately if you're in the middle of a muscle spasm.
Related Reading
What About Magnesium?
One randomized study found that taking magnesium supplements at night decreased both the frequency and duration of nocturnal leg cramps, according to October 2021 results in Nutrition Journal.
But other research indicates otherwise. For instance, another randomized trial found no difference between the effectiveness of magnesium compared to a placebo at reducing the frequency of leg cramps, per May 2017 findings in JAMA Internal Medicine.
A September 2020 review in Cochrane Library examined the results of 11 studies and also concluded that taking magnesium didn't appear to reduce the frequency or severity of cramps in older adults.
While it's possible more research may conclude that magnesium has a preventive benefit, there's no real evidence that taking magnesium in the moment — when experiencing a cramp — will alleviate it. A magnesium deficiency isn't a contributing factor for leg cramps, per the Cleveland Clinic.
What About Pickle Juice?
While it may sound strange at first, there's a logic to shooting down some pickle juice for a leg cramp: This pungent liquid is quite salty, and salt is a key electrolyte.
To that end, it's common for people to treat exercise-induced leg cramps with pickle juice, according to a May 2016 review in Muscle & Nerve. But research shows it's unlikely pickle juice would be an effective treatment, per the review.
"That's probably not going to do anything," Dr. Hameed says, noting that by the time you make it to your fridge, a leg cramp will likely have stopped on its own.
Instead, make sure to stay well hydrated during and after exercise with water or sports drinks. The American Council on Exercise recommends drinking the following amounts:
- 17 to 20 oz two to three hours before exercise
- 8 oz 20 to 30 minutes before exercise
- 7 to 10 oz every 10 to 20 minutes during exercise
- 8 oz within 30 minutes after exercise
- 16 to 24 oz for every pound of body weight lost during exercise
What About Quinine?
You may know quinine as a malaria treatment, or the ingredient featured in tonic water.
Quinine is the reason tonic water was thought of as a drink to stop leg cramps or restless legs at one point, but it's no longer recommended due to the high risk for drug interactions and side effects, per an August 2012 article in American Family Physician. These side effects can be serious, too, including bleeding and permanent kidney damage, according to the FDA.
What About Avoiding Certain Foods?
There are no known foods that trigger leg cramps, so there's nothing specific you can cut out of your diet to avoid them.
However, because cramps might come on due to an electrolyte imbalance, your best bet is to follow a healthy diet full of fruits, vegetables, whole grains and lean proteins, so your body gets all the nutrients it needs to function at its best.
Strategies to Prevent Leg Cramps
There are a few simple strategies that can help ward off leg cramps, so you don't have that middle-of-the-night or mid-workout gasp of pain and discomfort. Try these preventative strategies:
- Hydrate: Dehydration is a key factor in leg cramps. And it's not just a summertime problem, as you sweat due to heat, Dr. Hameed points out — if you're in a city with radiator heat, it can dry you out as well, she says. Try sports drinks to keep you hydrated and replace electrolytes, per the U.S. National Library of Medicine.
- Assess your workout: If you're not taking rest days or are ramping up too much on runs or leg workouts, it can stress your body, Dr. Hameed says. Make sure to give your body recovery time. And, runners: Keep in mind if you're training for a long run, you may need to incorporate strength training to ensure your muscles are strong enough to withstand all those miles, she adds.
- Stretch: If you often get nocturnal leg cramps, stretching before bed can be helpful, Dr. Hameed says.
- Change your sleep habits: Untuck those sheets and covers! That way, your feet won't be trapped, per guidance from the Cleveland Clinic. Stomach sleepers can also try letting their feet hang off the edge of the bed, while back sleepers can try keeping toes pointed up, the Cleveland Clinic notes.
- Wear the right shoes: Opting for shoes with good support may be helpful, per the Mayo Clinic.
When to See a Doctor
Leg cramps aren't typically cause for worry. But if they occur frequently (and don't appear to be the result of exercise) and are quite severe, follow up with your health care provider.
They could be due to a medication you're taking — which likely could be adjusted — or they may be a sign of a more serious condition that merits investigation, Dr. Baxi says.
- Cleveland Clinic: "Leg Cramps"
- Mayo Clinic: "Muscle cramp"
- PeaceHealth: "Muscle Cramps"
- Nutrition Journal: "A randomized, double-blind, placebo-controlled, multicenter study assessing the efficacy of magnesium oxide monohydrate in the treatment of nocturnal leg cramps"
- JAMA Internal Medicine: "Effect of Magnesium Oxide Supplementation on Nocturnal Leg Cramps"
- Cochrane Library: "Magnesium for muscle cramps"
- Muscle & Nerve: "A Narrative Review of Exercise-Associated Muscle Cramps: Factors that Contribute to Neuromuscular Fatigue and Management Implications"
- U.S. National Library of Medicine: "Muscle Cramps"
- Mayo Clinic: "Steps Can Be Taken to Relieve or Prevent Night Leg Cramps"
- FDA: "FDA Drug Safety Communication: New risk management plan and patient Medication Guide for Qualaquin (quinine sulfate)"
- American Council on Exercise: "How Hydration Affects Performance"
Is this an emergency? If you are experiencing serious medical symptoms, please see the National Library of Medicine’s list of signs you need emergency medical attention or call 911.