Get,

Free Doctor Tips

to manage your symptom

Get your,

FREE Doctor Tips Now!!

4 Cr+ families

benefitted

Enter your Phone Number

+91

|

Enter a valid mobile number

Send OTP

Verify your mobile number

OTP sent to 9988776655

CONGRATULATIONS!!!

You’ve successfully subscribed to receive

doctor-approved tips on Whatsapp


Get ready to feel your best.

Hi There,

Download the PharmEasy App now!!

AND AVAIL

AD FREE reading experience
Get 25% OFF on medicines
Banner Image

Register to Avail the Offer

Send OTP

By continuing, you agree with our Privacy Policy and Terms and Conditions

Success Banner Image
Verify your mobile number

OTP sent to 9988776655

Comments

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

Leave your comment here

Your email address will not be published. Required fields are marked *

25% OFF on medicines

Collect your coupon before the offer ends!!!

COLLECT

Top Foods That May Help With Muscle Cramps

By Dr. Malavika Athavale +2 more

Join Health Talk by PharmEasy on WhatsApp

Introduction

Only few things interrupt sleep or a workout as abruptly as a muscle cramp. A muscle cramp is a sudden, involuntary and often painful tightening of a muscle that can last from a few seconds to several minutes. While cramps are usually harmless and resolve on their own, they can be distressing, especially when they occur frequently1

A balanced diet rich in fluids and key minerals supports normal muscle and nerve function, and may help reduce how often cramps occur in some people. Here we will discuss some evidence-based look food choices that may help with cramps. But first let’s see what causes them. 

Foods That May Help with Muscle Cramps

Causes of Muscles Cramps

Although the exact cause of muscle cramps is not fully understood, factors commonly associated with them include dehydration, electrolyte imbalances (involving minerals such as potassium, magnesium, calcium and sodium), muscle fatigue, prolonged sitting or standing, nerve compression and reduced blood flow. Certain groups, such as older adults, pregnant women, athletes and people with conditions like diabetes, thyroid disorders or kidney disease, may experience cramps more often2

Advertisement

Did you know? 

  • Muscle cramps can occur in any muscle, but they are most common in the thighs, feet, and hands. source: MedlinePlus 
  • Dehydration can lead to muscle cramps. source: MedlinePlus 
  • Muscle cramps can be more common in older adults, overweight individuals, athletes, pregnant women, and people with certain medical conditions. source: MedlinePlus 
  • Stretching, massaging, and applying heat or ice can provide relief from muscle cramps. source: MedlinePlus 

Why Minerals and Fluids Matter for Muscle Function?

Muscle contraction and relaxation depend on the coordinated movement of electrolytes (electrically charged minerals) across cell membranes3

  • Potassium helps transmit nerve signals and supports normal muscle contraction. 
  • Magnesium plays a role in muscle relaxation and energy production; low levels have been linked with cramping in some individuals, particularly during pregnancy. 
  • Calcium is essential for the muscle contraction process itself. 
  • Sodium helps maintain fluid balance and nerve signaling, and is lost in significant amounts through sweat. 
  • Water keeps blood volume adequate so muscles receive oxygen and nutrients, and helps electrolytes stay in balance. 

When any of these fall out of range, whether through heavy sweating, inadequate intake, illness or certain medicines such as diuretics, the risk of cramping may rise. 

Foods That May Help with Muscle Cramps

Owing to the presence of some essential nutrients needed for proper muscle function, the following food items may help avoid/ease muscle cramps:  

1. Bananas

banana
Image Source: freepik.com

A medium banana provides roughly 422 mg of potassium along with some magnesium and carbohydrates, which is one reason athletes often reach for them during matches. Adding a banana to breakfast cereal or eating one before exercise is a simple way to support daily potassium intake (the recommended adequate intake for adults is about 2320 mg for women and 3016 mg for men daily)4,5

2. Watermelon and Other Melons

watermelon
Image Source: freepik.com

Watermelon is 92% per cent water and also supplies potassium, making it useful on two fronts: hydration and electrolyte intake. A couple of slices after outdoor activity in hot weather can help replace lost fluids. Muskmelon (cantaloupe) is similarly hydrating and potassium-rich6,7

Advertisement

3. Sweet Potatoes

sweet potato
Image Source: freepik.com

One large baked sweet potato with skin offers around 855 mg of potassium (roughly 25-30 per cent of an adult’s daily requirement) plus some magnesium and calcium. Enjoy them roasted, boiled, baked or mashed8,9

4. Avocado

avocado

Avocados are among the most potassium-dense fruits, with a whole fruit providing roughly 975 mg, which is about twice that of a banana. They also contain magnesium. Try mashed avocado on toast or a sandwich in place of mayonnaise, or add slices to a salad. Because avocados are calorie-dense, moderation is sensible10

About 975 milligram of potassium is present in one avocado that is twice as much as a sweet potato or a banana. Since it helps maintain your heart health and enables your muscles to function, potassium is believed to be essential. To cope with muscular cramps, add an avocado in mashed form to your breakfast sandwich instead of your go-to mayonnaise spread. You can even add a piece to your salad. Remember to consume in moderation as they are high in fat and calories24.

Dr. Siddharth Gupta, B.A.M.S, M.D (Ayu)

5. Dairy Products and Other Calcium-Rich Foods 

Dairy Products
Image Source: freepik.com

Calcium is central to muscle contraction, and dairy foods such as milk, curd (yogurt) and cheese are among its richest sources; 100 g of yogurt provides around 167 mg of calcium, plus fluids, sodium and potassium. Non-dairy options include ragi (finger millet), sesame seeds, almonds, leafy greens and small fish eaten with bones. Adults generally need about 1,000 mg of calcium daily11,12,13,14

6. Legumes- Lentils and Beans

legumes
Image Source: freepik.com

Dals, beans and chickpeas are good plant sources of magnesium. One cup of lentils provides roughly 90 mg of magnesium, while a cup of cooked black beans offers about 120 mg (adult requirements are around 310–420 mg per day). Legumes also supply fibre, which supports blood sugar management and heart health15,16

Magnesium is abundant in legumes like beans and lentils. About 90 milligram of magnesium is present in one cup of lentils, whereas 120 milligram is present in one cup of cooked black beans. Additionally, they contain a lot of fibre, and studies have shown that fibre-rich meals may help manage blood sugar, reduce levels of ‘bad’ also known as LDL cholesterol, and reduce the occurrence as well as the intensity of period cramps25

Dr. Rajeev Singh, BAMS

7. Nuts and Seeds

nuts
Image Source: freepik.com

Almonds, cashews, pumpkin seeds and sunflower seeds are concentrated sources of magnesium; about 28 g (a small handful) of almonds provides roughly 77 mg. A handful as a snack, or seeds sprinkled over salads and curd, is an easy daily habit17,18

8. Coconut Water and Other Fluids

coconut water
Image Source: freepik.com

Water remains the foundation: most adults should aim for adequate fluid intake through the day, and more during exercise, hot weather, fever, vomiting or diarrhea. Coconut water offers natural potassium, sodium and magnesium, making it a gentle rehydration option. Diluted lemon water with a pinch of salt, buttermilk (chaas), tomato juice and citrus juices are other fluid-and-electrolyte options. Urine that is pale yellow generally indicates good hydration19

9. Dark Chocolate 

dark chocolate

Dark chocolate (70 per cent cocoa or higher) supplies magnesium (roughly 252 mg per 100 g serving) along with antioxidant plant compounds called flavanols. A small square or two can contribute to magnesium intake, though it should not replace whole-food sources given its sugar and calorie content20.  

Note: Nutrition alone cannot guarantee a cramp-free life, and research on diet and cramps is still evolving. It’s best to discuss with your doctor if you have persistent or frequent cramps as these may indicate the presence of some underlying health issues as well. 

What to Do During a Cramp?

  • Gently stretch the affected muscle (for a calf cramp, straighten the leg and pull the toes towards you). 
  • Massage the muscle with your hands. 
  • Apply a warm compress to a tight muscle, or an ice pack to a sore, tender muscle afterwards. 
  • Walk around slowly or shake the limb gently once the cramp eases21
  • Sip water or an electrolyte-containing fluid if you have been sweating heavily22

Tips to Help Prevent Cramps

Tips to Help Prevent Cramps
  • Stay hydrated through the day, increasing intake during exercise and hot weather. 
  • Warm up before exercise and avoid sudden increases in training intensity. 
  • Stretch calves, hamstrings and feet before bedtime if you get night cramps21
  • Eat balanced meals that regularly include fruits, vegetables, legumes, dairy, nuts and whole grains. 
  • Avoid keeping legs in one position for long periods; loosen tight bedding at the foot of the bed. 
  • Limit alcohol, which can contribute to dehydration. 

When to See a Doctor?

Occasional cramps are common and usually not a cause for concern. However, consult a doctor if cramps: 

  • Occur frequently or are severe enough to disturb sleep regularly, 
  • Are accompanied by muscle weakness, swelling, redness or skin changes, 
  • Do not improve with self-care, hydration and dietary changes1,
  • Began after starting a new medicine (such as diuretics or statins), or23
  • Occur alongside conditions such as diabetes, kidney, liver, thyroid or nerve disorders, or during pregnancy2.

A doctor will check for the underlying causes, including electrolyte disturbances, circulation problems or medication effects, and advise whether any supplement is appropriate. Do not self-prescribe high-dose mineral supplements, as excess potassium or magnesium can be harmful, particularly for people with kidney disease1.

Also Read: Top High Protein Vegan Foods You Should Eat

Conclusion

Muscle cramps have many possible triggers, and diet is one piece of the puzzle. While no food can claim to cure cramps, a well-hydrated body and a diet that regularly includes potassium-, magnesium- and calcium-rich foods such as bananas, melons, sweet potatoes, avocados, dairy, legumes, nuts and seeds, along with adequate fluids, supports healthy muscle and nerve function and may help reduce the frequency of cramps. Pair good nutrition with regular stretching, sensible exercise habits and timely medical advice for persistent problems. 

Frequently Asked Questions (FAQs)

Which deficiency most commonly causes muscle cramps? 

Cramps are often linked with low levels of potassium, magnesium, calcium or sodium, as well as dehydration. However, many cramps occur without any deficiency, so persistent cramps should be evaluated by a doctor. 

Is a banana really helpful for muscle cramps?

Bananas provide potassium and magnesium, which support normal muscle function, and are a convenient pre- or post-exercise snack. They contribute to prevention overtime rather than offering instant relief during a cramp.  

How much water should I drink to help prevent cramps?  

Around 8 glasses (about 2–2.5 litres) a day suits most adults, with more needed during exercise, hot weather or illness. Pale yellow urine is a practical sign of adequate hydration. 

What helps a leg cramp at night?

Gently stretch the muscle (for a calf cramp, straighten the leg and pull your toes towards you), then massage it and apply a warm compress. Stretching the calves before bed may help reduce night cramps. 

Can I take magnesium or potassium supplements for cramps? 

Not without medical advice. Evidence for supplements in cramp prevention is mixed, and excess minerals can be harmful, especially in kidney disease. Ask a doctor before starting any supplement. 

When are muscle cramps a sign of something serious? 

See a doctor if cramps are frequent, severe, disturb sleep regularly, come with weakness or swelling, or started after a new medicine. These may point to an underlying condition needing evaluation.

References

1. Muscle Cramps. Accessed July 20, 2026. Available from: https://medlineplus.gov/musclecramps.html 

2. How to prevent and treat muscle cramps. June 15, 2020. Accessed July 21, 2026. Available from: https://wexnermedical.osu.edu/our-stories/how-to-prevent-and-treat-muscle-cramps 

3. Shrimanker I, Bhattarai S. Electrolytes. In: StatPearls. StatPearls Publishing; 2026. Accessed July 20, 2026. Available from: http://www.ncbi.nlm.nih.gov/books/NBK541123/ 

4. Bananas, raw – Nutrients – SR Legacy | USDA FoodData Central. Accessed July 20, 2026. Available from: https://fdc.nal.usda.gov/food-details/173944/nutrients 

5. Potassium • The Nutrition Source. June 3, 2019. Accessed July 22, 2026. Available from: https://nutritionsource.hsph.harvard.edu/potassium/ 

6. Simon D. Watermelon Nutrition Facts and Benefits – Franklin County Center | N.C. Cooperative Extension. Franklin County Center. July 18, 2024. Accessed July 20, 2026. Available from: https://franklin.ces.ncsu.edu/news/watermelon-nutrition-facts-and-benefits/ 

7. Watermelon : Center for Agriculture, Food, and the Environment (CAFE) at UMass Amherst. Accessed July 22, 2026. Available from: https://www.umass.edu/agriculture-food-environment/nutrition/publications-resources/produce-spotlight/watermelon-0 

8. Simon D. Nutritional Benefits of Sweetpotatoes – Franklin County Center | N.C. Cooperative Extension. Franklin County Center. May 8, 2025. Accessed July 20, 2026. Available from: https://franklin.ces.ncsu.edu/news/nutritional-benefits-of-sweetpotatoes/ 

9. Content – Health Encyclopedia – URochester Medicine. Accessed July 20, 2026. Available from: https://www.urmc.rochester.edu/encyclopedia/content?ContentTypeID=76&ContentID=11508-2 

10. Avocados, raw, all commercial varieties – Nutrients – SR Legacy | USDA FoodData Central. Accessed July 20, 2026. Available from: https://fdc.nal.usda.gov/food-details/171705/nutrients 

11. Anitha S, Givens DI, Botha R, et al. Calcium from Finger Millet—A Systematic Review and Meta-Analysis on Calcium Retention, Bone Resorption, and In Vitro Bioavailability. Sustainability. 2021;13(16):8677. doi:10.3390/su13168677 Available from:  https://www.researchgate.net/publication/354353188_Calcium_from_Finger_Millet-A_Systematic_Review_and_Meta Analysis_on_Calcium_Retention_Bone_Resorption_and_In_Vitro_Bioavailability

12. Hendley J. Calcium-rich foods: How to boost your intake of this important mineral. Harvard Health. February 4, 2025. Accessed July 20, 2026. Available from:  https://www.health.harvard.edu/diet-and-nutrition/calcium-rich-foods-how-to-boost-your-intake-of-this-important-mineral 

13. Branch NSC and O. Calcium and Vitamin D: Important for Bone Health. National Institute of Arthritis and Musculoskeletal and Skin Diseases. May 5, 2023. Accessed July 20, 2026. Available from: https://www.niams.nih.gov/health-topics/calcium-and-vitamin-d-important-bone-health 

14. Yogurt, plain, nonfat – Nutrients – Foundation | USDA FoodData Central. Accessed July 22, 2026. Available from: https://fdc.nal.usda.gov/food-details/2647437/nutrients 

15. Beans, black, mature seeds, cooked, boiled, without salt – Nutrients – SR Legacy | USDA FoodData Central. Accessed July 20, 2026. Available from: https://fdc.nal.usda.gov/food-details/173735/nutrients 

16. Lentils, raw – Nutrients – SR Legacy | USDA FoodData Central. Accessed July 20, 2026. Available from: https://fdc.nal.usda.gov/food-details/172420/nutrients 

17. Seeds, pumpkin seeds (pepitas), raw – Nutrients – Foundation | USDA FoodData Central. Accessed July 20, 2026. Available from: https://fdc.nal.usda.gov/food-details/2515380/nutrients 

18. Nuts, almonds, dry roasted, with salt added – Nutrients – Foundation | USDA FoodData Central. Accessed July 20, 2026. Available from: https://fdc.nal.usda.gov/food-details/323294/nutrients 

19. Coconut Water -Properties, Uses, Nutritional Benefits in Health and Wealth and in Health and Disease: A Review. Accessed July 20, 2026. Available from: https://www.academia.edu/30536202/Coconut_Water_Properties_Uses_Nutritional_Benefits_in_Health_and_Wealth_and_in_Health_and_Disease_A_Review 

20. Cinquanta L, Di Cesare C, Manoni R, Piano A, Roberti P, Salvatori G. Mineral essential elements for nutrition in different chocolate products. Int J Food Sci Nutr. 2016;67(7):773-778. doi:10.1080/09637486.2016.1199664 Available from: https://pubmed.ncbi.nlm.nih.gov/27346251/

21. How to get rid of muscle cramps in your legs. Harvard Health. April 3, 2021. Accessed July 21, 2026. Available from: https://www.health.harvard.edu/pain/how-to-get-rid-of-muscle-cramps-in-your-legs 

22. When do you need to add electrolytes to your exercise? May 10, 2024. Accessed July 21, 2026. Available from: https://health.osu.edu/wellness/exercise-and-nutrition/hydration-and-electrolytes 

23. I Have Leg Cramps At Night—Am I Normal? | University of Utah Health. December 20, 2018. Accessed July 21, 2026. Available from: https://healthcare.utah.edu/the-scope/health-library/all/2023/07/i-have-leg-cramps-night-am-i-normal 

24. Bergh B. The avocado and human nutrition. I. Some human health aspects of the avocado. In: Proceedings of the Second World Avocado Congress; 1992 Apr 21–26; Orange, California, USA. Riverside (CA): University of California; 1992. p. 25-35. Available from: https://www.avocadosource.com/WAC2/WAC2_p025.pdf

25. Sankara Rao DS, Doesthale YG. Mineral composition of four Indian food legumes. J Food Sci. 1981;46(6):1962-1963. doi:10.1111/j.1365-2621.1981.tb04534.x. Available from: https://ift.onlinelibrary.wiley.com/doi/abs/10.1111/j.1365-2621.1981.tb04534.x

Disclaimer: The information provided here is for educational/awareness purposes only and is not intended to be a substitute for medical treatment by a healthcare professional and should not be relied upon to diagnose or treat any medical condition. The reader should consult a registered medical practitioner to determine the appropriateness of the information and before consuming any medication. PharmEasy does not provide any guarantee or warranty (express or implied) regarding the accuracy, adequacy, completeness, legality, reliability or usefulness of the information; and disclaims any liability arising thereof.

Links and product recommendations in the information provided here are advertisements of third-party products available on the website. PharmEasy does not make any representation on the accuracy or suitability of such products/services. Advertisements do not influence the editorial decisions or content. The information in this blog is subject to change without notice. The authors and administrators reserve the right to modify, add, or remove content without notification. It is your responsibility to review this disclaimer regularly for any changes.

Likes 65
Dislikes 4
Advertisement

Comments

Leave your comment...