The keto flu happens as your body goes through withdrawals from sugar and carbohydrates. It's the symptoms from your body detoxing and it can very much feel like the flu.
A few symptoms of a magnesium deficiency include anxiety, insomnia, low energy, muscle cramps, high blood pressure, and hormonal imbalances such as PMS.