Including why it happens and what you can do to prevent it in the first place if you're trying the popular high-fat, low-carb ketogenic diet.

The high-fat, low-carb ketogenic diet is *crazy* popular right now. It makes sense. Who wouldn't want to try a diet that allows you to eat pretty much ~all the avocados~ and still potentially lose weight?! (To be fair, portion control still matters...that's one of the many things people get wrong about the keto diet.) Still, the keto diet works really well for a lot of people with various health goals, from weight loss to athletic performance to getting type 2 diabetes under control.

But if you've tried keto yourself or know someone who has, you may be familiar with a phenomenon called the "keto flu." Though many people who commit to keto end up feeling great eating this way after the kinks have worked out, the first couple of weeks can be, well, tough. Here's why.

Keto Flu Symptoms

Sometime during the first couple of weeks on keto, many people report feeling, erm, not so great. "The most common symptoms are feeling tired, lethargic, achy, having a mild headache, cloudy, slow thinking, as well as possible lightheadedness and some hunger," says Craig Primack, M.D., an obesity medicine physician who uses keto with some of his patients.

Cramping, muscle tightness, and moodiness are also possible, says registered dietitian Sylvia North. "In layman's terms, you might just feel a little 'off,' as if you're about to come down with the flu," she adds. For most people, this lasts for anywhere from 12 hours to a week, but it really depends on the individual.

Why "Keto Flu" Happens

Here's the bad news about the keto flu: There's no hard data on exactly what causes it. Experts do have an idea of why it happens, though. "Most experts think the sensations are from adapting to a different fuel source," explains registered dietitian Danielle Aberman. Normally, your body uses glucose derived from carbs for energy. When you're in ketosis, your body begins using fat for energy, as well.

"The body is switching from being a carb-burning machine to a fat-burning machine," says Aberman. "This is a significant metabolic shift that the average healthy person can do, but sometimes it can feel unpleasant."

Most experts think hydration and electrolyte changes also contribute to keto flu, according to Aberman. "During ketosis, the kidneys get internal signals to make more urine. The increased urination causes increased loss of sodium, potassium, and magnesium in addition to the loss of fluid." This is also what causes the initial drop in scale weight during the first week or so on the keto diet. As your body loses electrolytes and hydration, you start to feel less than amazing. (Related: How to Stay Hydrated When Training for an Endurance Race)

The good news? It's totally temporary. "The symptoms of keto flu go away with time as your hormones and metabolism change to become more efficient at using fat for fuel," says North. "This is sometimes called being 'fat-adapted' or 'keto-adapted.'" Of course, how long it takes for this to happen varies from person to person.

Can You Prevent the Keto Flu?

It's not known whether you can prevent the keto flu, but there are things you can do to try to optimize your experience with the keto diet from the beginning, says Aberman. First and foremost, staying hydrated is key.

Next, preemptively adding a little salt to your food may help. "Since the ketogenic diet is mainly composed of healthy, whole foods, the sodium content is often far less than the typical Western diet," she says. "Salting your food is probably needed to give your body what it usually gets." It's also a good idea to choose foods that are higher in nutrients you lose when you start producing more urine (potassium and magnesium, for example) like avocado, spinach, and almonds.

It's also important to note that not everyone will experience keto flu. "It does not happen to everyone, and the more times that you are in ketosis, the less likely it is to happen," says Dr. Primack. In other words, keto flu isn't inevitable, and if you've already tried the keto diet before, you may avoid feeling transitional symptoms altogether. This may be the case for people who practice carb cycling. (Related: How to Safely and Effectively Come Off the Keto Diet)

What to Do If You Have the Keto Flu

If you are dealing with keto flu, know that it won't last forever, but here's how to deal with the symptoms in the meantime.

  • Hydrate with liquids high in electrolytes. In addition to drinking more water, try some electrolyte-boosted liquids. "Some people find relief by sipping broth or dill pickle juice," says Aberman.​
  • Take OTC meds if needed. "Some people with headaches find relief from the usual over-the-counter remedies like ibuprofen or aspirin," says Aberman.​
  • Take it easy. A few days off from intense exercise is probably a good idea, experts say. Plus, it will take a bit before you're back at peak performance. "It can be from four to eight weeks before you regain your top energy or performance power when exercising," says North. (Heads up: Here are eight things you need to know about exercising on the keto diet.)​
  • Check in with your doctor or dietitian. While some period of adjustment is normal, it's a good idea to consult a health care practitioner if things don't seem to be improving. "If the initial 'flu-like' symptoms carry on for longer than a week, then it's advised to seek professional advice," says North.

Lastly, it's worth noting that just like any eating style, the keto diet isn't for everyone. "There is a subgroup of people that never seem to feel good on a ketogenic diet," says Dr. Primack. On the other hand, "there are some patients that feel more energetic, clear, happy, and content after they transition to ketosis." So, above all, it's important to listen to your body and make adjustments accordingly.