Sleep affects a person's cognitive health — the brain's capacity to think, learn and memorize things. However, the number of hours you need to sleep to prevent cognitive decline may vary depending on whether you are an early or late riser.

In a study, published in the Journal of Affective Disorders, researchers tried to ascertain the quantity of sleep needed to reduce the risk of cognitive decline, considering an individual's habit of waking up early (morningness) or getting up late (eveningness).

They found that early risers require five to six hours of sleep, while those who wake up later need seven to eight hours.

Previous research has shown links between short sleep duration and elevated risk of cognitive decline. A study published last month suggests that older people who lack deep sleep are at higher risk of developing dementia. They found that getting 1% less deep sleep a year could elevate the risk by 27% in people over the age of 60.

However, most studies have not considered how the sleep required to offset cognitive decline is different for early and late risers.

"The aim of the present study was to determine the association between sleep hours and changes in cognitive function and whether the morningness-eveningness type which was categorized by habitual sleep schedules affects the association," the researchers wrote.

The study was based on the self-reported sleeping habits of 224,714 participants from the Korean Community Health Survey, of which 55.6% were morningness type, 5% were eveningness sleepers and the rest were in the intermediate group.

The lowest cognitive decline risk was found in people who sleep seven to eight hours a day and among those with the habit of waking up early.

"The present study demonstrated that without considering sleep quality, 7 to 8 sleep hours had the lowest risk of cognitive decline, and the morningness type had a lower risk of cognitive decline than the intermediate type or eveningness type. When sleep quality was adjusted, the sleep hours showing the lowest risk of cognitive decline were 5 to 6 h in the morningness subgroup, 6 to 7 h in the intermediate subgroup, and 7 to 8 h in the eveningness group," the researchers wrote.