Sleep deprivation can lead to a multitude of diseases. It also decreases your white blood cell count (those good cells that fight off germs). In studies done on sleep deprived rats, the rats had a 20% decrease in white blood cell counts - a significant change in their immune systems. People who sleep well have significantly better immune function than people with insomnia. Poorer sleep efficiency and shorter sleep duration in the weeks preceding an exposure to a rhinovirus (cold) were associated with lower resistance to illness.
Avoid caffeine. Get 7-9 hours of sleep/night.