Using a CPAP to treat sleep apnea will help you get the quality sleep your body needs. Studies show that lack of sleep affects your immune system, making you more likely to get sick. Getting 7-8 hours of sleep every night helps strengthen your immune system to fight off infection.