What does a German fairytale and a severe sleep disorder have in common? A lot, apparently.

Ondine’s curse — or, more officially, central hypoventilation syndrome — is an often fatal respiratory disorder that occurs during sleep. Typically the disorder is congenital, but in some cases can be developed later in life, especially when the patient has also had a severe injury to the brain or brain stem.

The syndrome got its common name from an old German story, which was popularized by the 1811 novella "Udine" and later the 1938 play "Ondine." According to legend, Ondine was a young nymph who fell in love with a mortal man. When she found out he was unfaithful to her, she became enraged and set a curse on him.

The curse itself varies from version to version, but all circle around her husband’s breathing. While he sleeps, he is unable to breath. For the rest of his life, her husband is never brought the peace of sleep for fear he might die.

The syndrome of Ondine’s curse is very similar. Patients with the curse are unable to maintain regular breathing during sleep, and is often considered a genetic, extreme form of sleep apnea. Those with the syndrome hypoventilate, resulting in a shortage of oxygen and a buildup of carbon dioxide in the blood.

Those afflicted with it can be treated using breathing machines. It’s diagnosed early on — often in utero — which can lead to a greater chance of survival, but because of its severity, it often leads to death.

It’s also very rare: the disorder affects less than 1,500 people worldwide, most of who are children. If caught early on and treated, some patients have been known to live up to 55 years of age.

While most don’t survive Ondine’s curse, one English teen is one of those people who defied the odds. Diagnosed as an infant with Ondine’s curse, Liam Derbyshire wasn’t supposed to live past six weeks. But Derbyshire, who was born in 1999, is still alive thanks to around-the-clock care and an at-home ventilator.