When ill, your body has to fight the infection with antibodies. To speed up the production of these, the body heats up, as higher temperatures mean faster chemical reactions to do this, your body 'turns up its thermostat', and makes your body think that it is colder than it is, so your body heats up: it makes you fell cold, so you put on layers, turn up the heating e.t.c. (this is done by a small gland near the centre of the brain, the hyperthermos (not sure about spelling)). When asleep, you thermostat does not, like normal, cool down, but stays at the same level.
So, at night, the body thinks it is cold, and cannot add layers (as you are asleep) so uses energy heating you up. This is one of the reasons that a sick person is often tired and hungry.