woman juicing greens
1 / 15

Eat to Beat Them

Muscle cramps happen when your muscles tense up and you can’t relax them. While painful, usually you can treat them yourself. Exercise, dehydration, and menstruation are common causes. One way to stop cramps is to stretch or massage your muscles and to eat enough of these key nutrients: potassium, sodium, calcium, and magnesium. They’re called electrolytes, and you can find them in the following foods.

Swipe to advance
woman peel banana
2 / 15

Bananas: A Time-Tested Treatment

You probably know that bananas are a good source of potassium. But they’ll also give you magnesium and calcium. That’s three out of four nutrients you need to ease muscle cramps tucked under that yellow peel. No wonder bananas are a popular, quick choice for cramp relief. 

Swipe to advance
sweet potato fries
3 / 15

Sweet Relief From Sweet Potatoes

Like bananas, sweet potatoes give you potassium, calcium, and magnesium. Sweet potatoes get the win because they have about six times as much calcium as bananas. And it’s not just sweet potatoes: Regular potatoes and even pumpkins are good sources of all three nutrients. Plus, potatoes and pumpkins naturally have a lot of water in them, so they can help keep you hydrated, too.

Swipe to advance
avocado toast
4 / 15

The Avocado: A Potassium Powerhouse

One creamy, green berry (yes, it's really a berry!) has about 975 milligrams of potassium, twice as much as a sweet potato or banana. Potassium is important because it helps your muscles work and keeps your heart healthy. So swap out mayo on a sandwich with mashed avocado, or slice one onto your salad to help keep muscle cramps away. They have a lot of fat and calories, so keep that in mind.

Swipe to advance
assorted beans and lentils
5 / 15

Beans and Lentils

Legumes like beans and lentils are packed with magnesium. One cup of cooked lentils has about 71 milligrams of magnesium, and a cup of cooked black beans has almost double that with 120 milligrams. Plus, they’re high in fiber, and studies show that high-fiber foods can help ease menstrual cramps as well as help control your blood sugar and lower levels of “bad” LDL cholesterol.

Swipe to advance
6 / 15

Melons Are the Total Package

These fruits have it all: loads of potassium, a good amount of magnesium and calcium, a little sodium, and a lot of water. Sodium and water are key because as you exercise, your body flushes sodium out with your sweat. If you lose too much water, you’ll get dehydrated, and muscle cramps may happen. Eating a cup of cubed cantaloupe after a workout can help.

Swipe to advance
7 / 15

Watermelon for Hydration

They’re about 90% water, so when you need foods that hydrate, a cup of watermelon will do it. Since it’s a melon, it’s also high in potassium, but not quite as high as others.

Swipe to advance
man pouring milk
8 / 15


It’s a natural source of electrolytes like calcium, potassium, and sodium. It’s good for hydration. And it’s packed with protein, which helps repair muscle tissue after workouts. All of the above can help protect against muscle cramps.

Swipe to advance
pickle juice
9 / 15

Pickle Juice

Some athletes swear by pickle juice as a fast way to stop a muscle cramp. They believe it’s effective because of the high water and sodium content. But that might not be the case. While pickle juice may help relieve muscle cramps quickly, it isn’t because you’re dehydrated or low on sodium. It is more likely because the pickle juice sets off a reaction in your nervous system that stops the cramp, according to recent research.

Swipe to advance
kale greens
10 / 15

Dark, Leafy Greens

They’re rich in calcium and magnesium. So adding kale, spinach, or broccoli to your plate may help prevent muscle cramps. Eating leafy greens also may help with menstruation cramps, as studies show eating foods high in calcium can help relieve pain from periods.

Swipe to advance
orange juice
11 / 15

Orange Juice

One cup of refreshing OJ has plenty of water for hydration. It’s also a potassium star with nearly 500 milligrams per cup. Orange juice has 27 milligrams of calcium and magnesium. Choose a calcium-fortified brand for an extra boost. 

Swipe to advance
mixed nuts
12 / 15

Snack Smart With Nuts and Seeds

Like beans and lentils, nuts and seeds are a great source of magnesium. For example, 1 ounce of toasted sunflower seeds has about 37 milligrams of magnesium. And 1 ounce of roasted, salted almonds has double that. Many types of nuts and seeds have calcium and magnesium as well.

Swipe to advance
13 / 15

Salmon for Circulation

Sometimes muscle cramps are the result of poor blood flow. Eating oily fish like salmon can help improve it. Plus, a 3-ounce portion of cooked salmon has about 326 milligrams of potassium and 52 milligrams of sodium to help with muscle cramps. Not a salmon fan? You also could try trout or sardines.

Swipe to advance
tomato juice
14 / 15

Tap Into Tomatoes, Juice and All

Tomatoes are high in potassium and water content. So if you gulp down 1 cup of tomato juice, you’ll get about 15%  of your daily value of potassium. You’ll also give your body hydration to prevent muscle cramps from starting.

Swipe to advance
woman stretching outside
15 / 15

Drink Water for Max Hydration

Generally, women need about 11.5 cups of water a day, and men 15.5 cups. But this doesn’t mean you should chug water. The water you get from other beverages, plus fruits and vegetables, counts, too. Before you reach for a sports drink, know this: You only need these sugary electrolyte beverages if you’re doing high-intensity exercise for an hour or more. For electrolytes without the sugar, drink coconut water instead.

Swipe to advance

Up Next

Next Slideshow Title

Sources | Medically Reviewed on 03/16/2020 Reviewed by Kathleen M. Zelman, MPH, RD, LD on March 16, 2020


  1. Getty
  2. Thinkstock Photos
  3. Thinkstock Photos
  4. Thinkstock Photos
  5. Thinkstock Photos
  6. Thinkstock Photos
  7. Thinkstock Photos
  8. Thinkstock Photos
  9. Thinkstock Photos
  10. Thinkstock Photos
  11. Thinkstock Photos
  12. Thinkstock Photos
  13. Thinkstock Photos
  14. Thinkstock Photos
  15. Thinkstock Photos


Mayo Clinic: “Muscle cramp,” “Water: How Much Should You Drink Every Day?”

Physicians Committee for Responsible Medicine: “Using Foods Against Menstrual Pain.”

Cleveland Clinic: “Don’t Let Foot Cramps and Charley Horses Slow You Down.”

Cedars-Sinai Medical Center: "Magnesium Rich Foods."

Columbia University: “Foods that minimize menstrual cramps?”

The Cooper Institute: “Does Pickle Juice Relieve Muscle Cramps?”

American Heart Association: “Hyperkalemia (High Potassium).”

European Journal of Clinical Nutrition: “Associations of Menstrual Pain with Intakes of Soy, Fat and Dietary Fiber in Japanese Women.”

Medicine and Science in Sports and Exercise:Reflex Inhibition of Electrically Induced Muscle Cramps in Hypohydrated Humans.”

National Institutes of Health Office of Dietary Supplements: “Magnesium.”

U.S. Department of Agriculture: "Basic Report: 09040, Bananas, Raw," "Basic Report: 11507, Sweet Potato, Raw, Unprepared," "Full Report (All Nutrients):  11353, Potatoes, Russet, Flesh and Skin, Raw," "Basic Report:  11422, Pumpkin, Raw," "Basic Report:  09037, Avocados, Raw, All Commercial Varieties," "Basic Report:  16070, Lentils, Mature Seeds, Cooked, Boiled, Without Salt," "Basic Report: 16015, Beans, Black, Mature Seeds, Cooked, Boiled, Without Salt," "Basic Report:  09181, Melons, Cantaloupe, Raw," "Basic Report: 09326, Watermelon, Raw," "Basic Report: 01079, Milk, Reduced Fat, Fluid, 2% Milkfat, with Added Vitamin A and Vitamin D," "Basic Report:  11457, Spinach, Raw,” "Basic Report:  11233, Kale, Raw,” "Basic Report:  09206, Orange Juice, Raw,” "Basic Report:  12539, Seeds, Sunflower Seed Kernels, Toasted, with Salt Added," "Basic Report: 12563, Nuts, Almonds, Dry Roasted, with Salt Added," "Basic Report: 15237, Fish, Salmon, Atlantic, Farmed, Cooked, Dry Heat,” "Basic Report:  11886, Tomato Juice, Canned, Without Salt Added."

Academy of Nutrition and Dietetics: “Hydrate Right During Physical Activity,” “Coconut Water: Is It What It's Cracked Up to Be?” “Kidney Disease: High- and Moderate-Potassium Foods,” “4 Keys to Strength Building and Muscle Mass.”

Reviewed by Kathleen M. Zelman, MPH, RD, LD on March 16, 2020

This tool does not provide medical advice. See additional information.

THIS TOOL DOES NOT PROVIDE MEDICAL ADVICE. It is intended for general informational purposes only and does not address individual circumstances. It is not a substitute for professional medical advice, diagnosis or treatment and should not be relied on to make decisions about your health. Never ignore professional medical advice in seeking treatment because of something you have read on the WebMD Site. If you think you may have a medical emergency, immediately call your doctor or dial 911.