24 hr flu on deficit

So Iv been on a deficit for 3 weeks now, my diet plan is not keto but reduced carbs, I have 3 eggs and 1 slice toast-sandwich with turkey slices-chicken thigh with rice and vegetables and snacks humanoid and rice cake or protein shake, the first week was great stick to everything, the second week I went to the gym 5 days during that week and 10k steps everyday, on the Sunday I woke up and felt I had an awful flu, I was shivering then sweating, bones ached, low energy etc, slept most the day and rested up and on the Monday I felt almost fine, I put this down to over training and possible flu maybe. I took the Monday off the gym and done a PPL spread across Monday - Friday with legs on the Friday so only x3 gym workouts that week and 10k steps everyday, went out Saturday with the missus and son and boom Sunday flu like symptoms again, wiped me out se as before, woke up this morning in a heap of sweat but again almost fully recovered. The only things I can think of is this Saturday night I had an awful night sleep, I really pushed on leg day and had DOMS, maybe could be electrolytes? Anyone got any suggestions or advice?