If you have been diagnosed with sleep apnea, COPD, emphysema or just have a hard time sleeping, you might be at a higher risk of developing dementia later in life, a new study suggests.

Published on Wednesday in the journal of American Academy of Neurology, a new study found that the level of oxygen in the brain while sleeping can cause abnormalities in the brain called microinfarcts, according to Medical News Today.

"[Micro-infarctions are] very small strokes that have been correlated with memory loss and thinking-skill problems in aging," said Dr. James Leverenz, from the Cleveland Clinic. Leverenz did not participate in the study, but he treats patients with dementia.

The study also discovered that people who don't sleep deeply are more likely to have brain cell loss than people who spend more time in deep sleep, also called "slow wave sleep." As people age, they naturally spend less time in deep sleep, which is needed to help the brain process memories and new facts. Brain cell loss is a central trait of Alzheimer's and dementia, according to Fox News.

"These findings suggest that low blood oxygen levels and reduced slow wave sleep may contribute to the process that lead to cognitive decline and dementia," study author Dr. Rebecca Gelber of the VA Pacific Islands Health Care System and Pacific Health research and Education Institute in Honolulu, Hawaii, told Fox News.

"More research is needed to determine how slow wave sleep may play a restorative role in brain function and whether preventing low blood oxygen levels may reduce the risk of dementia," Gelber said.

In a previous study, Gelber found that a sleep apnea breathing machine, or c-pap, might help cognition in dementia patients.

"Your spouse or your bed partner is telling you that you're snoring very loudly, or it seems that you stop breathing at certain points during your sleep or you're just having a lot of fatigue during the day; it's work going to see your physician and getting your sleep evaluated because if you do have true sleep apnea it's not good for your brain," Leverenz advised in a news release.