What foods help muscles recover after cramps? 8 good picks
This article is for general information only and is not medical advice. If cramps are frequent, severe, or come with weakness, swelling, or skin changes, talk to a doctor.
Key takeaways
- Cramps are tied to four key electrolytes: potassium, sodium, calcium, and magnesium.
- Bananas, sweet potatoes, avocados, beans, and leafy greens are the most documented food sources of those minerals.
- Food supports recovery and prevention; it is not a treatment for an underlying condition.
A muscle cramp is a sudden, involuntary tightening of a muscle that you cannot relax on purpose. Exercise, dehydration, and menstruation are among the common triggers, according to WebMD's slideshow on cramp-relief foods, medically reviewed by Dr. Lalitha Kadali in February 2026. One practical way to support recovery is to eat enough of the nutrients muscles use to contract and relax: potassium, sodium, calcium, and magnesium.
This article explains which foods supply those electrolytes, including bananas and sweet potatoes, avocados and leafy greens, beans and nuts, and hydrating options like watermelon and coconut water, and what the research actually shows.

The four electrolytes that matter
Muscles contract and relax through a trade of minerals across the muscle fibers. WebMD lists four that matter most for cramps: potassium, sodium, calcium, and magnesium. When these run short, through sweat, poor diet, or certain medications, cramps become more likely.
This does not mean every cramp is a mineral shortage. Often the cause is simply an overworked muscle or holding one position too long. But keeping these four topped up through food is a reasonable, low-cost piece of recovery and prevention. It is general nutrition, not a diagnosis or a cure.
For context on what cramps feel like and how they differ from spasms, see cramp vs spasm.
Bananas and sweet potatoes
Bananas are the classic pick, and the numbers back up the reputation. A banana delivers potassium plus smaller amounts of magnesium and calcium, which is three of the four key nutrients under one peel, according to WebMD.
Sweet potatoes go further. Like bananas, they supply potassium, calcium, and magnesium. But they carry roughly six times as much calcium as a banana, per WebMD. Regular potatoes and pumpkins are solid sources of the same three minerals, and their high water content helps with hydration too.
If you only change one thing, a banana after a workout or a roasted sweet potato with dinner are the two simplest moves on this list. Related reading: do bananas prevent muscle cramps.
Avocados and leafy greens

Avocados are a potassium standout. One avocado holds about 975 milligrams of potassium, roughly twice what a banana or sweet potato offers, according to WebMD. Potassium helps muscles work and supports heart health, so the mineral pull here is real. The catch is calories and fat: avocados are dense, so a half or a quarter goes a long way.
Leafy greens cover the magnesium side. Spinach in particular is described by the Economic Times as a magnesium powerhouse that supports muscle repair after activity. Kale, Swiss chard, and cooked spinach all land in the same territory. Toss them into curries, lentils, or salads. They cost little and add very few calories.
Beans, lentils, and nuts

Legumes are among the best magnesium sources in an ordinary kitchen. One cup of cooked lentils has about 71 milligrams of magnesium, and a cup of cooked black beans has nearly double that, around 120 milligrams, per WebMD. They also bring fiber, which has its own benefits for blood sugar and cholesterol.
Nuts and seeds close the loop. Almonds, walnuts, and chia seeds add magnesium plus vitamin E and omega-3 fatty acids, which the Economic Times links to calmer inflammation and less post-workout stiffness. A small handful is enough; nuts are calorie-dense, so portions matter.
Hydrating foods and drinks
Dehydration is one of the most common cramp triggers, so water-rich foods earn their place. Watermelon is about 90 percent water and supplies potassium and magnesium, according to Weekly Wellness. It also contains citrulline, an amino acid linked to better blood flow. The Indian Express cites a 2013 Spanish study in which 500 milliliters of watermelon juice led to better recovery and less muscle soreness among athletes.
Coconut water is another documented option. It is rich in potassium and also contains calcium, sodium, magnesium, and phosphorus. The Indian Express cites a 2012 study published in the Journal of the International Society of Sports Nutrition that found coconut water effective at maintaining hydration and exercise performance in trained athletes.
Plain water still counts. If dehydration is behind your cramps, food alone will not fix the fluid gap.
What the research actually shows
Be honest about the limits. The studies cited above tested specific drinks in athletes, not banana-eating in ordinary people with night cramps. The watermelon and coconut water findings are real but narrow. The mineral content of bananas, avocados, beans, and greens is well documented, and the role of electrolytes in muscle function is established. What is less established is that eating any single food will stop a cramp that is already happening.
Think of these foods as recovery support and prevention over days and weeks, not as an emergency fix. Stretching and massage during a cramp, plus steady hydration, remain the first-line self-care most sources recommend.
Athletes who hydrate and still cramp should read why cramps happen despite drinking water.
The bottom line
After cramps, aim your meals at the four electrolytes: potassium, sodium, calcium, and magnesium. Bananas, sweet potatoes, avocados, leafy greens, beans, lentils, and nuts are the most evidence-backed everyday sources, and watermelon or coconut water can help on the hydration side. Eat them as part of a normal balanced diet, keep drinking water, and see a doctor if cramps keep coming back or come with worrying symptoms. For how long cramps normally last, see how long a muscle cramp usually lasts.
Do bananas actually stop muscle cramps?
Bananas supply potassium, magnesium, and calcium, the minerals muscles use to contract and relax. They are a reasonable recovery snack, but no study shows a banana stops an active cramp on the spot.
What should I drink after cramps?
Water first. Coconut water adds potassium and other electrolytes, and a 2012 study found it maintained hydration and performance in trained athletes. Watermelon juice has some recovery evidence too.
Are supplements better than food?
This article covers food only. Supplements are a medical decision: doses, interactions, and kidney issues matter, so talk to a doctor or dietitian rather than self-prescribing.
How fast will eating these foods help?
Mineral repletion works over days, not minutes. Think of it as lowering your cramp risk across the week, not rescuing tonight's cramp.
Topics: muscle cramps, nutrition, electrolytes, recovery, healthy eating
Rive News is the research desk behind this article. It covers practical health explainers based on published sources.
Latest in Health
- Do bananas prevent muscle cramps?
- Dehydration and next-day muscle cramps
- How long does a muscle cramp usually last?
Subscribe for weekly practical health explainers.
Corrections: spotted an error? Email the research desk and it will be fixed with a dated update note.


