Poor sleep – which includes having difficulty falling or staying asleep – may age the brain by nearly three years, scientists have said.

Scans of nearly 600 middle-aged people showed sleeping badly was associated with poorer brain health years later.

This was despite adjusting for factors such as age, sex, high blood pressure and diabetes, the scientists said.

Kristine Yaffe, of the University of California San Francisco and a member of the American Academy of Neurology, said: “Our findings highlight the importance of addressing sleep problems earlier in life to preserve brain health, including maintaining a consistent sleep schedule, exercising, avoiding caffeine and alcohol before going to bed and using relaxation techniques.

“Future research should focus on finding new ways to improve sleep quality and investigating the long-term impact of sleep on brain health in younger people.”

For the study, published in the journal Neurology – the medical journal of the American Academy of Neurology, people with an average age of 40 at the start of the study filled in sleep questionnaires at the beginning and then again five years later.

The questions focused on six main sleep characteristics: short sleep, bad sleep quality, difficulty falling asleep, difficulty staying asleep, waking up early, and daytime sleepiness.

Those in the low group had no more than one poor sleep characteristic while people in the middle group had two to three, and those in the high group had more than three, the researchers said.

People taking part also had brain scans 15 years after the study began to see how much their brain structures had changed.

Results showed people in the middle group had an average brain age that was 1.6 years older than those in the low group, while those in the high group had an average brain age 2.6 years older.

Dr Clemence Cavailles, of the University of California San Francisco, said: “Sleep problems have been linked in previous research to poor thinking and memory skills later in life, putting people at higher risk for dementia.

“Our study which used brain scans to determine participants’ brain age, suggests that poor sleep is linked to nearly three years of additional brain aging as early as middle age.”

Meanwhile, another study, also published in Neurology, suggests good sleep quality, staying physically active, a healthy diet and not smoking may help lower the risk of stroke, dementia and depression later in life.

Data also shows keeping four measurements – body weight, cholesterol, blood pressure and blood sugar – in a healthy range may be good for overall brain health, according to researchers from the US.

These measures – known as Life’s Essential 8 – have been previously shown to promote heart health and slow down ageing.

The findings are based on data from more than 316,000 adults from the UK Biobank – which holds medical and lifestyle records of more than half a million Britons.

Study author Dr Santiago Clocchiatti-Tuozzo, of Yale University in the US and member of the American Academy of Neurology, said: “Brain health is paramount for the optimal well-being of every person, enabling us to function at our highest level and constantly adapt in the world.

“Our study found that making these healthy lifestyle choices in middle age can have meaningful impacts on brain health later in life.”