Restless sleep may be a bad sign in some people
Physically "acting out" dreams when asleep could be an early warning sign of dementia or Parkinson's disease.
Canadian researchers studied 93 people with "REM sleep behaviour disorder", which can involve punching or kicking out while dreaming.
The Neurology study found more than a quarter were diagnosed with a degenerative brain condition over the next five years.
UK experts said the research could help doctors predict the condition.
Normally, during "Rapid Eye Movement", or "REM" sleep, our muscles relax and do not move, but people with certain sleep disorders are able to lash out, or cry out.
It is a known symptom of some kinds of brain disease, including Parkinson's disease, and a rare form of dementia called Lewy body dementia.
The exact reason for the link is unclear, although some have suggested that subtle damage to a part of the brain which regulates sleep may be responsible.
However, in some cases, the problem happens long before the onset of the main symptoms of these diseases, and doctors at Montreal General Hospital wanted to see whether apparently otherwise healthy people with the problem were at higher risk.
Their study volunteers were all elderly - on average 65 years old - which already put them at higher risk of developing dementia or Parkinson's compared with a younger person.
However, each was followed on average for five years, and in that period, 26 of the 93 developed a degenerative brain disease.
In total, 14 were diagnosed with Parkinson's disease, seven with Lewy body dementia, four with Alzheimer's Disease, and another diagnosed with a disorder called multiple system atrophy, which involves both Parkinson's and dementia symptoms.
Their predictions suggested that patients of this age with the same sleep disorder would have a greater than 50/50 chance of falling prey to a similar condition over the following 12 years.
The researchers said that knowing more about the risks faced by people with the sleep disorder could not only help doctors to advise their patients, but also to work in the years to come to come up with ways to protect them.
Dr Susanne Sorensen, head of research at the Alzheimer's Society, said that the findings were particularly interesting in relation to Lewy body dementia, which accounts for only 4% of dementia cases.
The researchers had said that even the four Alzheimer's cases might turn out to be Lewy body dementia as the disease progressed.
Dr Sorensen said: "People with Lewy body dementia often have vivid nightmares, restless sleep and hallucinations - this study suggests that people with the disease may experience sleep disorders years before their other symptoms develop.
"This important finding could boost our understanding of how Lewy body dementia develops and help us detect it early. With further research we may be able to stop this devastating disease in its tracks."