To diagnose a sleep disorder, your doctor will ask about your sleep habits and medical conditions. Next, you may be referred to a sleep clinic for testing. A polysomnogram, also called a sleep study, records brain activity, eye movements, and breathing while you sleep. These patterns can indicate a disorder like sleep apnea or a less common type. Research has identified more than 85 sleep problems, including sleep terrors, REM sleep behavior disorder, and sleep starts.