Why do you get sick more often when you are on a diet?
Whether you get sick more often depends on how strict your diet is: moderate reduction is usually not a problem, but with a severely low-calorie diet the immune system can weaken, partly due to magnesium deficiency. Pay attention to your intake of magnesium-rich foods when losing weight.
Short-term or moderately reduced food intake does not necessarily make you more susceptible to infections. With mild dietary restriction, some immune functions can actually improve and unwanted inflammation can decrease. The problem arises when you follow a strict or prolonged diet, causing your body to enter a state of genuine nutritional stress.
With a severely calorie-restricted diet, the immune system reshuffles its priorities. The functions most essential for immediate survival remain intact or are even strengthened. Other functions are scaled back. This makes you selectively more vulnerable to certain infections, even if immunity is still working well in other areas.
Magnesium plays a concrete role here. People who eat very restrictively risk becoming deficient in this mineral. Magnesium is needed for certain immune cells, known as killer cells, to function at full capacity. They can only truly attack pathogens when an activation lock on their surface is in the right position, and magnesium is the key that enables this. At low magnesium levels, that fighting capacity measurably declines.
At the same time, caloric restriction raises levels of the hunger hormone ghrelin. That may sound unfavourable, but ghrelin also has an immune-regulating effect: it dampens excessive inflammatory responses and stimulates the production of new immune cells. Whether this provides sufficient counterbalance depends on how strict the diet is and how long it lasts.
Intermittent fasting lowers metabolic inflammation and improves blood sugar regulation, but the effects on the immune system are nuanced and differ by cell type and organ. A dietary pattern genuinely rich in vegetables, fruit, whole-grain products and nuts is associated with lower inflammatory markers in the blood, although that association has not been directly proven to be causal. Anyone who wants to diet without compromising their immune system is best advised not to cut calories too drastically and to keep magnesium-rich foods, such as nuts, legumes and leafy vegetables, on the menu.
All claims are based on one PMID (35139351) for the immune-system priority effect, one (18579754) for ghrelin, one (35051368) for magnesium and T-cells, one (38719726) for intermittent fasting, and one (35219904) for dietary patterns and inflammation. None of the studies is a large RCT or meta-analysis specifically addressing "getting sick more often due to dieting"; the claims are mechanistic and associational in nature.