Skip to main content
Diet and Nutrition

Leg Cramps? These 5 Foods Could Be Part of the Problem

Patricia Pinto-Garcia, MD, MPHKatie E. Golden, MD
Written by Patricia Pinto-Garcia, MD, MPH | Reviewed by Katie E. Golden, MD
Published on September 16, 2026

Key takeaways:

  • No single food causes leg cramps, but diets high in sodium and low in minerals may make cramps more likely. 

  • Foods like salty snacks, sugary drinks, alcohol, refined grains, and processed meats can increase your risk of leg cramps when they replace more nutritious foods.

  • Choosing foods rich in magnesium, calcium, and potassium may help support healthy muscles and lower your risk of leg cramps 

If you get frequent leg cramps at night or after exercise, you may wonder if something in your diet is to blame. 

No single food has been proven to cause leg cramps. But foods that are high in sodium or low in important nutrients like magnesium, calcium, and potassium have been linked to a higher risk of muscle cramps. These foods can also crowd out more nutrient-rich options that help keep your muscles working normally. 

Let’s take a look at five foods that can increase the risk of leg cramps and what to eat instead.

1. Potato chips

Potato chips are high in sodium (salt), which may make leg cramps more likely over time. 

Diets high in sodium may lead to calcium and magnesium loss in the urine. Calcium and magnesium help your muscles contract and relax normally, and studies show that people with low levels of these minerals are more likely to develop leg cramps. 

Salty snacks can also leave you thirsty, making it easier to become dehydrated if you don’t drink enough water. Dehydration is another common trigger for leg cramps. 

It’s not just potato chips, either. Any salty snack may trigger leg cramps like:

  • Pretzels

  • Tortilla chips

  • Cheese puffs

  • Crackers

You don’t have to avoid these foods altogether, but you should limit them if you’re prone to leg cramps. If salty snacks make up a large part of your diet, you may be eating fewer foods that naturally provide magnesium, calcium, and potassium. Instead opt for mineral-rich snacks like nuts, seeds, yogurt, and fresh fruit. 

2. Sugary drinks

Sugary drinks may make leg cramps more likely. People who drink a lot of soda or other sweetened beverages may be less likely to drink water to stay hydrated. 

Not drinking enough water can increase the risk of dehydration, which can worsen leg cramps.

Sugary drinks can also replace other beverage choices like milk, which naturally contains calcium and potassium. Over time, not getting enough calcium and potassium can increase the risk of leg cramps.

Examples of drinks that are high in sugar include:

  • Fruit punch

  • Sweet tea

  • Energy drinks

  • Sports drinks

  • Sweetened coffee drinks

You don’t have to give up sugary drinks completely. But choosing water, sparkling water, or unsweetened drinks more often can help you stay hydrated and support healthy muscle function.

3. Alcohol

Studies show that alcohol intake can increase the risk of leg cramps

Alcohol intake makes you more prone to dehydration. It also lowers your body’s ability to absorb and hold on to magnesium, calcium, and potassium. Heavy or regular alcohol use can also damage muscle, making cramps more likely.

All types of alcohol are linked to a higher risk for leg cramps, including:

  • Beer

  • Wine

  • Liquor

  • Hard seltzers

  • Mixed drinks 

Cutting back on alcohol and staying well hydrated may help lower the risk of leg cramps. 

4. White rice

White rice is a refined grain. Refined grains contain fewer vitamins and minerals than whole grains. Eating refined carbohydrates often doesn’t directly cause leg cramps, but it can make it harder to get enough magnesium, potassium, and calcium.

All refined carbohydrates can increase your risk of leg cramps if you’re eating them instead of more nutrient-dense foods. Examples of refined carbohydrates include:

  • White bread

  • Regular pasta

  • Crackers

  • Pastries

  • Breakfast cereals

You don’t have to avoid these foods altogether, but choosing whole grains more often can help you get more of the nutrients your muscles need. 

5. Hot dogs

Hot dogs are a processed meat that’s typically high in sodium and lower in important minerals. 

Eating processed meats doesn’t directly cause leg cramps, but diets high in these foods may contribute to lower intakes of magnesium and potassium while adding extra sodium. This combination may make leg cramps more likely over time. 

It’s not just hot dogs, either. Other types of processed meats include:

  • Bacon

  • Sausage

  • Deli meat

  • Pepperoni

  • Salami

You can try eating more nutrient-dense protein options more often like:

  • Lean meat

  • Fish

  • Tofu

  • Beans

When should you worry about leg cramps?

Occasional leg cramps usually aren’t a cause for concern. But make an appointment with your healthcare team if your leg cramps:

  • Are new

  • Happen often

  • Wake you up at night

  • Keep you from your usual activities 

They can help determine what’s causing your cramps. In some cases, leg cramps can be a symptom of a more serious condition, such as peripheral artery disease, chronic liver disease, or a deep vein thrombosis (DVT).

A DVT is a blood clot that usually forms in the leg. Get urgent medical care right away if you have leg pain or cramping along with any of these symptoms:

  • Swelling in one leg

  • Redness or discoloration of the skin

  • Warm skin over the painful area

  • Shortness of breath

  • Chest pain

  • Fainting

  • Fast heartbeat

Frequently asked questions

Staying hydrated may help prevent leg cramps. Water is often the best option to stay hydrated throughout the day. Electrolyte-containing drinks that are low in sugar may help with leg cramps from exercise or excessive sweating. 

Gently stretching and massaging the muscle can help stop a leg cramp. For a calf cramp, try to slowly straighten the knee and pull your toes up. Placing a rolled towel around the ball of your foot and pulling the towel ends up can make it easier to stretch your calf. 

There’s no proven way to prevent nighttime leg cramps. But some people find that stretching their calf and hamstring muscles, staying well hydrated, and eating foods rich in potassium, calcium, and magnesium may help lower their risk.

The bottom line

No food has been proven to directly cause leg cramps, but your overall diet can affect how well your muscles work. Eating fewer processed, salty foods and more foods rich in magnesium, calcium, and potassium may help lower your risk of cramps over time. Most leg cramps aren’t serious, but frequent or worsening cramps may be a sign of another health condition. Talk with your healthcare team if cramps keep coming back. Get immediate medical care if cramps happen with symptoms like swelling, redness, or trouble breathing.

why trust our exports reliability shield

Why trust our experts?

Patricia Pinto-Garcia, MD, MPH, is a medical editor at GoodRx. She is a licensed, board-certified pediatrician with more than a decade of experience in academic medicine.
Katie E. Golden, MD, is a board-certified emergency medicine physician and a medical editor at GoodRx.

References

American College of Sports Medicine. (2007). Exercise and fluid replacement. Medicine & Science in Sports & Exercise.

Delacour, C., et al. (2018). Association between alcohol consumption and nocturnal leg cramps in patients over 60 years old: A case-control study. Annals of Family Medicine.

GoodRx Health has strict sourcing policies and relies on primary sources such as medical organizations, governmental agencies, academic institutions, and peer-reviewed scientific journals. Learn more about how we ensure our content is accurate, thorough, and unbiased by reading our editorial guidelines.

Was this page helpful?

Latest articles