Sleeping for nine hours a night could be as bad for your memory as only getting five.
It is well known that people who sleep fewer than five hours a night can expect memory problems. But a study found the same effects in those who get a healthy-sounding nine hours a night.
Researchers looked at memory test results for almost 400,000 people who were asked to match six pairs of hidden cards after memorising their positions.
Compared to people getting seven hours of sleep, those who reported sleeping for nine hours made the same number of errors as people sleeping five or less.
They made 5 per cent more errors in the card game, which fell to two per cent when factors like age and sex were taken into account.
And those who slept for ten hours made 11 per cent more errors - six per cent when adjusted for people's characteristics.
The results suggest that sleeping for too long may hit thinking skills just like sleep-deprivation.
Experts believe people who sleep for too long may have poorer sleep quality, which prevents regions of the brain communicating properly and puts them at risk of cognitive issues.
Researchers also looked at the genetics of the participants, and so took into account those who were predisposed to sleeping longer. This ruled out health problems having an impact on their results.
Dr Victoria Garfield, senior author of the study from UCL, said it is 'not that novel' to find that less sleep is bad for you, but called this result 'unusual'.
She added: 'Some people may think that going to bed and sleeping for as long as you like is fine, but our findings show that sleeping for too long may affect memory.'
Albert Henry, lead author of the research published in the International Journal of Epidemiology, said: 'We found little evidence that short or long sleep is linked to risk of dementia, however more research is needed.'