By HollyHerman.com Editorial Team. Sources checked October 2, 2026. General information only, not medical advice. See our Medical Disclaimer.
The short answer: No food or drink has been shown to stop a leg cramp once it has started. In the moment, the best-supported moves are stretching the muscle, massaging it, and standing on the leg, according to the NHS. Food and fluids are mostly about trying to prevent cramps over time, and the evidence there is thinner than most “foods that stop cramps” lists suggest.
If you're cramping right now, start with the steps below. If you get cramps often, especially at night, keep reading. This page is straight about what is supported and what is only plausible, and the last sections cover when to call a clinician.
What to Do During a Cramp
- Stretch the muscle and gently massage it. The NHS says both may ease the pain, although most cramps go away without you doing anything.
- Stand up and put your weight on the leg, if you can do it safely. The NHS says this may also help.
- Give it a few minutes. Leg cramps can last from a few seconds up to 10 minutes. The muscle may feel sore for up to 24 hours afterward.
- Don't count on a pill to stop the cramp itself. The NHS says paracetamol (known as acetaminophen in the US) or ibuprofen can ease soreness afterward, but they take too long to work while the cramp is happening.
- Think about fluids once it passes. The NHS lists not drinking enough fluids as one possible cause of leg cramps.
Can a Food or Drink Stop a Cramp Immediately?
The sources reviewed for this article don't show that any food stops a cramp that is already underway. The WebMD and Healthline food lists frame their advice as prevention, using wording like “may help.”
The one exception people ask about is pickle juice. WebMD notes that some athletes swear by it as a fast fix. It says recent research suggests that if it works quickly, it is more likely because it triggers a reaction in the nervous system than because it replaces water or sodium. The research WebMD cites was not reviewed for this article, and none of the sources address pickle juice for night-time leg cramps, so treat it as interesting but unproven for that use. Healthline describes pickles as typically high in sodium, so ask your clinician first if you've been told to limit salt.
Food and Fluids: What the Evidence Supports
Below, each piece of the usual advice is sorted by how strong the evidence looks. The strength labels are this article's plain-language read of the linked sources, not a medical rating.
Magnesium
- Evidence strength: Weak to against, for supplements in older adults with common night cramps.
- What the research says: A Cochrane review found, with moderate certainty, that magnesium is unlikely to reduce how often or how severe cramps are in older adults. That finding came from five studies with 271 participants. For pregnancy-related cramps, the reviewers were very uncertain. They found no trials of magnesium for exercise-related cramps. The review covers studies through September 2019.
- Side effects: Minor side effects in the trials were mostly digestive, such as diarrhea and nausea.
- The limit: That review looked at magnesium supplements, not food. WebMD lists magnesium-rich foods such as beans, lentils, nuts, seeds, and leafy greens, and says one cup of cooked black beans has about 120 milligrams. Those are fine parts of an ordinary diet, but none of the sources reviewed show that eating them stops cramps.
You may also see topical magnesium creams advertised for nerve and back discomfort. We wrote an independent review of one such product. That review covers a marketed cream for sciatic and lower-back discomfort, not cramps, and nothing here suggests it prevents them.
Potassium
- Evidence strength: Limited. It shows an association, not proof.
- What the research says: Healthline describes a study of 230 women in which those who had muscle cramps ate less dietary potassium than those who didn't. Healthline itself says more research is needed.
- What's in the foods: WebMD reports about 975 milligrams of potassium in one avocado, about 326 milligrams in a 3-ounce portion of cooked salmon, and nearly 500 milligrams in a cup of orange juice. These are nutrient amounts, not proof that eating them prevents cramps.
- Important caution: The NIH Office of Dietary Supplements says people with chronic kidney disease, or who take certain medicines such as ACE inhibitors or potassium-sparing diuretics, can develop high potassium levels even from food. It also says very high amounts of potassium supplements or potassium-containing salt substitutes can cause high potassium even in healthy people. If that could be you, talk to your clinician before increasing potassium.
Hydration
- Evidence strength: Plausible but limited, and mostly studied in exercise.
- What the research says: The NHS lists dehydration as a possible cause of leg cramps, and Healthline names it among the common contributors. Healthline also describes a small study of 10 male athletes. After intense exercise, those who rehydrated with an electrolyte drink similar to coconut water were less susceptible to cramps triggered by electrical stimulation than when they drank plain water. Healthline says more research is needed.
- The limit: Lab-triggered cramps in athletes are not the same as the cramp that wakes you at 2 a.m.
- Practical notes from WebMD: It cites general daily water figures of about 11.5 cups for women and 15.5 cups for men, counting water from other drinks and water-rich foods. It says you don't need to chug water, and that sugary sports drinks are only needed for an hour or more of high-intensity exercise. For electrolytes without the sugar, it suggests coconut water. If a clinician has told you to limit fluids, follow that advice instead.
Sodium
- Evidence strength: Plausible if you sweat heavily, with no strong evidence for night cramps.
- What the sources say: WebMD explains that sweat carries sodium out of the body and that losing too much water can lead to dehydration and cramps. Healthline says salty fermented foods like pickles and kimchi are typically high in sodium, but that more research is needed before they can be recommended for cramps.
Specific “cramp-fighting” foods (bananas, avocado, yogurt, bone broth, smoothies)
- Evidence strength: Preliminary.
- What the sources say: The food lists mostly argue from nutrient content. They show that a food contains potassium, magnesium, calcium or water. The sources reviewed don't point to a trial showing that any single food prevents leg cramps.
Why Leg Cramps Happen (and Why Food Isn't the Whole Story)
According to the NHS, leg cramps can sometimes be caused by:
- aging
- straining muscles during exercise, which can be worse in hot or humid weather
- pregnancy, usually in the later stages
- certain medicines, including statins for cholesterol and diuretics for high blood pressure
- not drinking enough fluids
- liver disease caused by drinking too much alcohol
The NHS also says the cause is unknown for some cramps. Healthline adds electrolyte imbalance, neuromuscular abnormalities and other medical conditions to the list of possible contributors. Because causes vary, a food change alone may not fix it.
A Prevention Step With Better Backing Than Any Food: Calf Stretching
The NHS says regular calf-stretching exercises may help reduce cramps, though they may not stop them completely. It's routine:
- Stand facing a wall and stretch out your arms until your hands can just touch it.
- Make sure you can stand up straight with your feet flat on the floor.
- Lean forward and press your hands against the wall until you feel your calf muscles stretch. Hold for 2 or 3 seconds.
- Stand up straight again.
- Repeat a few times for 5 minutes, 3 times a day, with the last round just before bed.
The NHS adds that if your cramps become less frequent, you might only need to do this once or twice a day.
When to Call a Clinician
The NHS advises seeing a doctor (a GP, in UK terms) if:
- leg cramps are disturbing your sleep
- you also have numbness or swelling in your legs
- cramps last longer than 10 minutes
It's also worth a call or visit if:
- the cramps started around the time you began a new medicine. The NHS lists statins and diuretics as possible causes. Don't stop a prescribed medicine on your own. Ask first.
- you have kidney disease or take an ACE inhibitor or potassium-sparing diuretic and want to eat more potassium-rich foods or use a salt substitute (per the NIH).
- You're pregnant and cramping. The NHS notes pregnancy is a possible cause, usually in the later stages, and the Cochrane reviewers were very uncertain whether magnesium helps in pregnancy, so ask before taking supplements.
If you have a medical emergency, call your local emergency services immediately.
The NHS says a doctor will examine you to look for the cause and suggest treatment based on it. In the UK, that might be stretching exercises, or quinine tablets if exercise hasn't helped. Quinine isn't suitable for everyone, so the doctor will review the risks and side effects first. Ask your own doctor what applies where you live.
What to Do Next
- Start the calf-stretching routine above, with the last round before bed.
- Drink fluids through the day, and count water-rich foods.
- If nothing limits your diet, eat potassium- and magnesium-containing foods as part of normal meals, with realistic expectations. They are not a proven cramp stopper.
- Jot down when cramps happen, how long they last, and any medicines you take, so a clinician can be more helpful.
- Book an appointment if any red flag above applies.
For how we research and handle corrections, see our Editorial Standards.
Sources
- NHS, Leg cramps: cramp duration, what to do during a cramp, causes, calf-stretch routine, when to see a doctor, UK treatment. Checked October 2, 2026.
- WebMD, Foods That May Help With Muscle Cramps: nutrient amounts, pickle juice, sports drinks, fluid figures. Checked October 2, 2026.
- Healthline, 12 Foods That May Help with Muscle Cramps: the 230-woman potassium study, the 10-athlete hydration study, fermented foods, contributors to cramps. Checked October 2, 2026.
- Cochrane, Magnesium for muscle cramps: magnesium supplements and cramps in older adults, pregnancy and other settings; side effects. Checked October 2, 2026.
- NIH Office of Dietary Supplements, Potassium: potassium cautions for kidney disease, ACE inhibitors, potassium-sparing diuretics, supplements and salt substitutes. Checked October 2, 2026.
Leave a Reply
You must be logged in to post a comment.