Diagnosis typically involves a sleep study called a [polysomnogram](#). This test records brain waves, oxygen levels in the blood, heart rate, and breathing during sleep. Other tests may include a home sleep apnea test, which is a simplified version of a polysomnogram.