How do you ensure your little one wakes up in a good mood each morning? According to experts, the answer lies in finding their ideal bedtime.
And thanks to a new, simple online calculator, every parent can work out the precise moment to send their kids off to sleep.
The calculator, developed by web-blinds.com with the help of doctors and sleep experts, works by taking a child's age and the time they need to wake up and responds with the best time for lights out.
Despite common theories, it seems earlier is not always better if it means they'll wake up at the wrong moment in a sleep cycle.
The ideal bedtime is based on the length of the child's cycle, which will vary depending on age, and the time it takes to reach a deep sleep - 14 minutes for the average child according to the website.
The idea behind the sleep calculator is based on children feeling happier and more energised if they are woken between sleep cycles rather than from a deep sleep.
According to the calculator, a four-year-old, who needs to wake up at 7am, should be put to bed at 5.46pm, 6.16pm, 6.46pm, 7.16pm or 7.46pm, based on an average 30-minute sleep cycle.
For a seven-year-old who needs to be up at 7am, the calculator suggests 7.56pm, 8.46pm or 9.36pm, based on a 50-minute cycle.
Noting that some children need more sleep than others, parents are advised to pick the bedtime that best suits their child's needs.
Sleep consultant Lucy Shrimpton told the Daily Mail: "Our sleep cycles are made up of REM sleep and non-REM sleep. Then we go into a lighter sleep as the cycle is ending so you feel naturally refreshed and ready to wake.
"If you are in deep sleep when you wake, which is not the natural waking part of your cycle, you are more likely to feel groggy. Coming out of it can be disorientating and confusing."
For teenage students, if they don't need to be at a lecture until 12am, the calculator will suggest a bedtime of 2.16am at the earliest.
While the calculator may sound like a god-send for parents waking up to cranky kids, Shrimpton says she is dubious that it can offer a perfect answer.
She says while it's based on correct theories, there are so many complexities including the time it takes for an individual to fall to sleep.