Diagnosis is often based on a detailed history of the individual's sleep experiences. A clinician may ask about the frequency, duration, and nature of the episodes. In some cases, a sleep study (polysomnography) may be recommended to rule out other sleep disorders like narcolepsy or sleep apnea.