If you want to keep feeling youthful even as you age, then getting a good night's sleep is key. A new study has found that seven to nine hours of shuteye a night can make you feel years younger upon waking.

And that perception may not just exist in your head. Studies have shown that simply feeling younger is associated with better mental and physical health, and a longer lifespan.

"While the previous literature has shown that feeling older is associated with worse sleep quality, our data indicate that sleep may be more important for subjective age than the other way around," write clinical neuroscientists Leonie Balter and John Axelsson from Sweden's Karolinska Institute.

"These findings support that sleep, a vital biological phenomenon, might hold the key to feeling young."

Sleep debt is known to suck the joy right out of life. It can mess with your emotions, make everything hurt more than usual, and change the way you view other people.

To investigate how it changes your perception of self, Balter and Axelsson conducted two experiments.

The first study included 429 adults aged 18 to 70, who were surveyed on aspects of their life such as their feelings of youthfulness, how many days they'd missed sleep in the past month, and how sleepy they felt.

Those who slept fully all 30 days prior, on average, felt 5.8 years younger than their actual age. Each night of insufficient sleep made the average participant feel 0.23 years older.

Digging further, Balter and Axelsson tested 186 adults up to the age of 46 to see how they handled just four hours of sleep for two nights. For a further two nights, participants were permitted to sleep nine hours.

Compared to a full night's sleep, the nights of restricted sleep made participants feel, on average, 4.4 years older.

What's more, feelings of sleepiness and alertness were closely tied to perceptions of age.

High levels of alertness were linked to feeling four years younger, on average, while the sleepiest participants typically felt six years older than their actual age.

"This means that going from feeling alert to sleepy added a striking 10 years to how old one felt," explains Balter.

Another interesting finding was that those participants who identified as 'morning people' – as opposed to evening types or somewhere in between – felt relatively younger when they slept the full nine hours a night. At the same time, however, they also were hit harder by negative perceptions of their age when they did have a bad night's sleep.

The authors call for future studies to investigate why sleep is linked to how old we feel. In the meantime, however, the duo argue that "safeguarding sleep is probably a key factor for feeling young."

The study was published in Proceedings of the Royal Society B: Biological Sciences.