Narcolepsy is caused by the loss of brain chemicals called hypocretins (orexins).
These neurotransmitters are involved in the regulation of the sleep/wake cycle as well as it will affect other bodily functions.
Like your metabolism.

This only happens in combination with a certain gen, all people with Narcolepsy have.
Since 1 out of each 2000 people have Narcolepsy, and every 1 out of 3 people have this gen, the heredity of Narcolepsy is supposed to be less then 3%.

It is believed that the loss of the brain chemicals is triggered by our own autoimmune defense that is fighting a virus and along the way destroys good cells too.

A second cause for Narcolepsy can be head injury where you’ve damaged the part of your brain that regulates your sleep/wake cycle.

Most cases of narcolepsy are sporadic, meaning the disorder occurs in individuals with no known family history of the disorder. But clusters in families sometimes occur—up to 10 percent of individuals diagnosed with narcolepsy with cataplexy report having a close relative with the same symptoms. In extremely rare cases, narcolepsy is caused by a genetic defect that prevents normal production of hypocretin molecules. While close relatives of people with narcolepsy have a statistically higher risk of developing the disorder than do members of the general population, that risk remains low when compared to diseases that are purely genetic in origin.