CPAP machines are used to treat and manage OSA and other breathing disorders. To find out whether you have OSA, you will need to do a sleep study. Polysomnogram is the medical term for this test to diagnose sleep apnea. You may need to go to a sleep clinic to do your sleep study. If you qualify, your doctor may order a small, portable device you can use at home to test for sleep apnea. The American Academy of Sleep Medicine has strict guidelines on who qualifies for a home sleep apnea test, or HSAT. The results from the sleep study help your doctor decide whether a CPAP will help you and what type. If you do have sleep apnea, the study also tells the doctor what pressure settings to use to help you breathe better at night.