A study has found that for those in middle to older age seven hours of sleep per night is optimal for them.

Both too much and too little sleep are associated with poorer cognitive performance and mental health, according to researchers from Cambridge University and Fudan University in China.

Scientists examined data from nearly 500,000 adults, aged between 38 and 73, from the UK Biobank.

Participants were asked about their sleeping patterns, mental health and wellbeing, and took part in a series of cognitive tests.

Brain imaging and genetic data were available for almost 40,000 of the study participants.

Border Counties Advertizer: Getting to the stage of a 'deep sleep' was important for cognitive ability (Canva)Getting to the stage of a 'deep sleep' was important for cognitive ability (Canva)

The researchers’ analysis of the data indicated that seven hours of sleep per night was the optimal amount for cognitive performance, such as processing speed, visual attention, memory and problem-solving skills.

It was also optimal for good mental health, with people experiencing more symptoms of anxiety and depression, and worse overall wellbeing, if they reported sleeping for longer or shorter amounts.

The researchers say one possible reason for the association between insufficient sleep and cognitive decline may be due to the disruption of slow-wave – “deep” – sleep.

Disruption to this type of sleep has been shown to have a close link with memory consolidation as well as the build-up of amyloid – a key protein which, when it misfolds, can cause “tangles” in the brain characteristic of some forms of dementia.

Additionally, lack of sleep may hamper the brain’s ability to rid itself of toxins.

Professor Jianfeng Feng, from Fudan University, said: “While we can’t say conclusively that too little or too much sleep causes cognitive problems, our analysis looking at individuals over a longer period of time appears to support this idea.

“The reasons why older people have poorer sleep appear to be complex, influenced by a combination of our genetic make-up and the structure of our brains.”

The researchers say the findings suggest that insufficient or excessive sleep duration may be a risk factor for cognitive decline in ageing.

This is supported by previous studies that have reported a link between sleep duration and the risk of developing Alzheimer’s disease and dementia, in which cognitive decline is a hallmark symptom.