Narcolepsy is a long-term neurological disorder that involves a decreased ability to regulate sleep-wake cycles. Symptoms include periods of excessive daytime sleepiness that usually last from seconds to minutes and may occur at any time. About 70% of those affected also experience episodes of sudden loss of muscle strength, known as cataplexy. These spells can be brought on by strong emotions. Less commonly there may be inability to move or vivid hallucinations while falling asleep or waking up. People with narcolepsy tend to sleep about the same number of hours per day as people without, but the quality of sleep tends to be worse. The exact cause of narcolepsy is unknown with potentially several causes. In up to 10% of cases there is a family history of the disorder. Often those affected have low levels of the neuropeptide orexin which may be due to an autoimmune disorder. Trauma, infections, toxins, or psychological stress may also play a role. Diagnosis is typically based on the symptoms and sleep studies, after ruling out other potential causes. Excessive daytime sleepiness can also be caused by other sleep disorders such as sleep apnea, major depressive disorder, anemia, heart failure, drinking alcohol, and not getting enough sleep. Cataplexy may be mistaken for seizures.