I have always been someone who could eat as much as I wanted, but never get an inch of muscle or fat. My stamina was decent for a person who wasn't really a sportsman. I could play for hours and run a couple of kms. This was till I was 22 when someone recommended me to join gym to get in shape. I was happy with the initial weight gain and building up of my muscles. But I fell I'll for 2/weeks. My muscles were gone. Instead I had all fat accumulated in my tummy. Why does this happen and what is probably a good way to reverse this? I miss those days when I could eat anything in any amount.
First off, rid yourself of the "I could eat anything in any amount" mindset. You couldn't, and here's why;
In order to gain weight, it's a simple case of eating more calories than you spend.
A lot of people say "oh, I can eat 4 helpings of taco, and I won't gain any weight". Well, for the trained eye, this resolves into "he ate a lot there and then, but the next few days, ate less, as a result".
You may not have noticed this, but over time, you simply didn't eat as much as you thought. It's just that the huge meals are easier to remember.
Now, for your question specifically, the reason why you got a belly has to do with the fact that during the time you were ill, you consumed more calories than you spent. Surplus calories get stored as fat, and the belly is the more noticable place because it has higher storage capacity. You did also gain more fat elsewhere, but the belly is easier to notice.
Reversing this is simply shedding fat as you normally would. Cardio in its various forms is an excellent place to start.
Keep in mind: You can't decide where you want to burn fat. Fat loss and fat gain happens everywhere, or nowhere. You often see people go to the gym, and do situps for ages, because they think they're targeting the belly fat for extinction. This is false! It doesn't work like that. Stick to cardio!
The body has feedback mechanisms to regulate the weight by adjusting the metabolic rate, but they only kick in when you are exercising hard almost every day. You just need to become fit enough to be able to run at least 10 km every day at a pace of at least 12 km/h. Once you are fit enough to do this level of cardio exercise, you'll find that eating even 1000 Kcal per day more will only lead to modest weight gain.
You should also make a habit of measuring everything you eat. This is what I always do, so I know for sure that I'm eating on average about 3500 kcal per day and this has increased gradually from 3000 kcal per day about 5 years ago. I also know that I've been gradually losing weight, I used to weigh about 62 kg and now I weigh about 56 kg. This weight loss is not due to a forcing of the 26 kcal per day deficit, the body would have had plenty of room to compensate for that. Rather, this is due to the inherent feedback mechanisms that the body uses to regulate the body weight. Human biology will implement some algorithm that will regulate the body weight to some (hopefully) optimal value.
If I had eaten 3400 Kcal instead of 3500 kcal, then the outcome of the complicated feedback mechanisms would likely have been a slightly higher body weight. The whole point of fat reserves is to let us last a while without food. The closer our energy intake is to the minimum amount you need, the greater the risk will be that is assigned to a food emergency (according to the algorithm that assumes that we are wild animals), therefore the algorithm will decide to save a bit more energy every day until we reach the higher desired weight.
While not much is known about the way these feedback mechanisms are implemented, one such mechanism is known. The more a fat cell is filled, the more leptin it will produce. Leptin lets the hypothalamus increase the production of the TRH hormone, which in turn lets the pituitary gland increase the production of the TSH hormone, which in turn increases the production of the thyroid hormone by the thyroid gland.