Getting enough shut-eye is one of life's biggest challenges. It's recommended that the average person get at least 7 hours of sleep per night to stay healthy and alert, but is there a particular optimal time for going to bed?

The division of people into 'morning larks' and 'night owls' is based on our individual circadian rhythms - the internal body clock that keeps us going. A tiny region in the brain's hypothalamus, called the suprachiasmatic nucleus (SCN), is the control centre of our internal timekeeping, and it runs in roughly 24-hour long cycles. Our sleep and wakefulness are regulated with hormones and neural activity from the SCN.

The daily cycle of light and dark plays an important role in our circadian rhythms. "If you put a human into an environment without any light/dark signals or any other time cues, they will fall asleep approximately every 24 hours," writes sleep researcher Sally Ferguson from Central Queensland University in Australia. "Light is the strongest signal to our biological clock and is critical to [..] keeping us synchronised to the external environment."

So, should we all be going to bed at sundown and rising with the birds? Not necessarily, although exposure to light is closely linked to the production of melatonin, the hormone that makes us sleepy. When it's light, the brain suppresses melatonin, which helps us stay alert. But people have individual differences in how soon after dark melatonin production kicks into gear, and this is why there is no set time for when a person starts getting sleepy. 

"It's a mistake to go to bed too early," clinical sleep researcher Rafael Pelayo tells The Wall Street Journal. "Trying to go to sleep when your body wants to be awake is like swimming upstream."

In other words, if you're fighting your natural rhythm, forcing yourself to go to bed early is only going to make you anxious about not being able to fall sleep. As insomnia researcher Allison Siebern from Stanford University in the US explains to Time magazine, the best time for a person to go to sleep is the hour when they feel the sleepiest. That's easier said than done, though - particularly for people with inconsistent sleep schedules, such as shift workers.

Still, experts recommend that the best way to get a good night's sleep is to try and rise around the same time every morning, and go to bed at our sleepiest, which might fluctuate slightly from day to day. To determine your optimal bedtime, set your alarm consistently, restrict the amount of time in bed to how many hours you normally need per night, and hit the sack 15 minutes before that. "Restricting your opportunity to sleep may actually make you go to bed later but the biologic drive to sleep will help you fall asleep faster and sleep deeper," explains Pelayo.

One final note is a warning on sleep quality throughout the night. We sleep in roughly 90-minute cycles, shifting from deep sleep to lighter rapid eye movement (REM) sleep. The latter tends to occur more in the second half of the night, closer to daybreak - so if you often go to bed super-late, you may be getting more REM sleep, and less of the restorative deep stuff that makes you productive and alert.