Get a good night's rest. When you sleep, your body produces cells that fight infection, inflammation, and stress—which means that getting too little sleep or poor-quality sleep not only makes you more prone to getting sick, but also increases the time you need to recover from illness.