Instead of thinking about how many hours to sleep, working with sleep cycles could be the key to a restful night.

So here’s the sleepy conundrum. The Mayo Clinic offers a general recommendation of 7 to 9 hours of sleep per night for adults; which perfectly straddles that 8-hours goal that many of us know. According to the National Sleep Foundation’s Sleep Health Index, Americans report sleeping an average of 7 hours and 36 minutes a night. Yet despite getting enough sleep, 35 percent of Americans report their sleep quality as poor and many (many) are the complaints of waking up not feeling refreshed.

Could it be that striving for a set amount of hours is the wrong approach? As it turns out, research is beginning to suggest that, as The Telegraph points out, “we should forget about counting how many hours sleep we’re getting – and instead start thinking about sleep according to the cycles it works in.”

And I have to say, from experience this resonates. I have had plenty of nights with enough sleep – and even more sleep than usual – only to wake up groggy beyond reason; while other nights the sleep is scant but I don’t feel retched. Likewise, a nap that’s more than 20 minutes leaves me wrecked for hours.

Author and sleep expert Dr. Laura Lefkowitz explains it like this: “The brain has a pattern of sleep. It’s not like you just fall asleep and hour one is the same as hours two and three and five and nine. It goes through cycles. Within each there is what we call non-REM sleep, and then REM sleep.”

Each cycle lasts for around 90 minutes, and disrupting the cycle can affect how you feel when you wake up. The goal is to wake at the end of a sleep cycle, when we’re in light sleep and the body and brain wake up most easily. Waking up in the midst of a deep sleep cycle can wreak havoc on your feelings of restfulness.

Now you may be asking, how does one manage to wake up at the end of a sleep cycle? The answer is to go to bed at the right time, like, to the minute, according to a new on-line sleep calculator. The tool works backwards from your wake-up time to figure out the optimal time to go to bed; for example, for my 5:50 a.m. wake-up time, I should aim for 8:36 p.m., 10:06 p.m., 11:36 pm or 1:06 p.m. (And falling-asleep time is factored in there.) Conversely, if you use the calculator when you’re tired and about to go to sleep, it will advise at what time to set your alarm.

Could the silver bullet for sleep woes be as simple as this? Sleeping in tidy chunks of 90-minute phases? There’s only one way to find out: try the calculator.