Leg cramps can intrude on your deep sleep, jolting you out of bed with an intense, sharp pain. When you become dehydrated or have an electrolyte imbalance, your risk of leg cramps increases. Dehydration results from not drinking enough fluid, sweating profusely, working outdoors in the heat and from stomach illnesses. It can also occur in the early stages of a very-low carbohydrate diet, when your body is learning how to metabolize fat instead of carbohydrates.
If you are eating a standard American diet, your main source of calories is carbohydrate. Your body converts carbohydrate into glucose, its preferred form of energy. Any glucose that you can't use right away is stored as glycogen.
When you switch to a low-carb diet, your body has to learn to make energy from fat, which takes a few weeks. Ketone bodies are a byproduct of fat metabolism. In ketosis, you have a higher-than-average number of ketone bodies in your blood and urine.
In the first few weeks of a very low-carb diet, your body will pull out all the glycogen that it can find and convert it into glucose. Glycogen is stored with water, so as you start to use this storage form of energy, you will release a significant amount of fluid. This is a part of the reason why weight drops so fast in the early weeks of a low-carb diet. If you aren't careful, you can disturb your electrolyte balance and become dehydrated, causing leg cramps.
Unfortunately, just drinking more water won't completely fix this metabolic type of dehydration. You also have to maintain a good electrolyte balance. According to Medline Plus, potassium, sodium, calcium and magnesium all play important roles in muscle function. When you switch to a low-carb diet, you may be eliminating several sources of these minerals, increasing your risk of leg cramps.
Allowing yourself a little salt on your steak can solve the sodium problem, and you can take a daily multivitamin that contains the other three minerals. Talk to your doctor before taking a separate calcium and magnesium supplement. Drink plenty of water throughout the day and avoid diuretics such as coffee and alcohol that further dehydrate you.