Menu Close

Keto Diet And Leg Cramps

Keto Diet And Leg Cramps

Nocturnal leg cramps are a common complaint in medical practices even among people not eating a low-carb or ketogenic diet. It is difficult to assess exactly how many people suffer from leg cramps, but some estimates are as high as 33% of all adults over age 50.1

Among low-carb and keto eaters leg cramps may be even more prominent. While exact numbers are hard to come by, increased frequency of leg cramps is generally considered a common side effect of the diet.

Fortunately, leg cramps don’t happen to everyone on the low-carb, keto diet. However, if they do happen to you, that early tingling can suddenly harden into a full-blown, agonizing charley horse that sometimes feels like it will tear the muscle off the bone.

The muscle soreness can last for days. Some people may experience legs cramps on a nightly basis, contributing to severe insomnia and potentially increasing their night-time risk of falling.2

If this happens to you, this guide will help. We’ll go into six key things to explore to get leg cramps under control.

Magnesium deficiency may be a problem for many

Magnesium is a crucial mineral that the body needs for more than 300 enzymatic reactions, including muscle contractions and neuro-muscular conduction of signals.6

So why can low-carb eating suddenly bring on leg cramps or make them worse? It may be because the low-carb keto diet shifts the balance of our electrolytes, particularly salt.1

  • Take a slow-release magnesium supplement for at least 20 days: Drs. Phinney and Volek have created a protocol for leg cramps in which you take three slow-release magnesium tablets a day for 20 days.
  • Take daily one-third the dose of milk of magnesia: Dr. Eric Westman recommends that his patients take a small daily dose of milk of magnesia (magnesium hydroxide), about 1 teaspoon a day, which is one-third the dose used for its laxative qualities. This small amount will not cause most people to have diarrhea but will up the amount of magnesium you absorb.
  • Try absorbing magnesium through the skin: A regular bath with Epsom salts (magnesium sulfate) is a relaxing way to soothe sore muscles and may help increase your magnesium stores, in addition to oral supplementation. You can also try massaging magnesium infused oils or lotions into the skin. As noted above, however, research to-date has not proven the effectiveness of this.3
  • Drink mineral water with magnesium: Some mineral waters have very little magnesium, but a few brands are very good sources of elemental magnesium which is very easily absorbed and easy on the stomach. A mineral water is considered to be a source of magnesium if it has a magnesium content of at least 50 mg per liter.


The electrolyte shifts that happen on the low-carb diet are largely the result of the loss of salt through urination. When the consumption of carbohydrates is low, the body releases less insulin, which causes the kidneys to excrete more salt in the urine.4

Drinking pickle juice is another common recommendation to ward off leg cramps caused by salt depletion. While there have been more than a dozen studies on the use of pickle juice for cramp prevention published in athletic journals over the last decade, its effectiveness and impact is still under debate and investigation.5

Potassium may help, too

Muscle cramps, muscle twitches and rapid heartbeats can all be a symptom of low potassium.  When salt is lost from the body at a higher rate due to low-carb eating, the kidneys may respond by increasing sodium absorption and excreting more potassium into the urine in an attempt to maintain biochemical balance.6

Increasing your consumption of high potassium foods like avocado, Swiss chard and spinach can often be all that is needed to increase your potassium levels.

Potassium supplements can be taken, too, but there is a risk you can take too much. Most multivitamins have about 80 mg of potassium per pill, but you can buy potassium on its own. Supplement makers by FDA regulation, however, are not allowed to make formulations with more than 99 mg of potassium per pill — that is why the pills are so tiny.7


  1. BioMedical Central Family Practice 2017: Criteria in diagnosing nocturnal leg cramps: a systematic review 
  2. American Family Physician 2012: Nocturnal leg cramps 
  3. Nutrients 2017: Myth or reality — transdermal magnesium
  4. American Journal of Physiology 2007: Insulin’s impact on renal sodium transport and blood pressure in health, obesity, and diabetes 
  5. Journal of Athletic Training 2015: Plasma and electrolyte changes in exercising humans after ingestion of multiple boluses of pickle juice 
  6. International Journal of Hypertension 2011: Insulin resistance, obesity, hypertension, and renal sodium transport 
  7. National Institutes of Health Office of Dietary Supplements: Potassium supplement brief