Obese people with sleep apnea may live longer when they use a CPAP machine to help keep their airways open while they sleep, a recent study suggests.

After following obese patients with sleep apnea for about 11 years, researchers found those who used the nighttime breathing aid were 42 percent less likely than those who didn’t use the devices to die of any cause.

Apnea that isn’t properly treated has been linked with excessive daytime sleepiness, heart attacks, heart failure and an increased risk of premature death.

“In patients with sleep apnea, there is a poor oxygenation of the body during sleep,” said lead study author Dr. Quentin Lisan of the Paris Cardiovascular Research Center in France.

“This has several consequences, including increased risk of cardiovascular diseases,” Lisan said by email. “PAP therapy allows a better oxygenation of the body during sleep, hence lowering the risk of these associated conditions, which in turn might decrease mortality.”