Have you ever heard anyone say “I need a cat nap” or “I feel so much better after a power nap”? Why is this true? And how long should such naps last? If you ask my cat, 1.5 hours is the magic number.* When he wakes up he stretches and gets right back to chasing a ball. But does the length of the nap really matter? The answer is yes, and here’s why.

In humans, the sleep cycle lasts 90 minutes. It begins with REM sleep–where you often dream–and then progresses into non-REM sleep. Throughout the four stages of non-REM sleep our bodies repair themselves. If we awake at the end of one of these 90 minute cycles, we feel refreshed and ready to go. But if we wake up in the middle of the non-REM cycle (when we are in a deep sleep) we feel groggy.

**So, where’s the math?**

Because our REM/non-REM stages cycle every 1.5 hours, that tells us that we can model the sleep stage *S* by a periodic function f(*t*)—one whose values repeat after an interval of time *T*, called the period—and that the period* T* = 1.5 hours. f(*t)*—one whose values repeat after an interval of time *T*, called the period—and that the period *T* = 1.5 hours. If we let the awake stage be *S* = 0 and assign each following stage to the next negative number, for example, stage 1 as -1, and so on, we can construct a trigonometric function that results in the following graph.

The peaks at the top of the graph show that 1.5, 3, 4.5, 6, and 7.5 hours are the optimal amounts of time to sleep. Don’t worry if you go a bit over or under, but you might want to keep the snooze on for only 5 minutes.

If you want to see more of the math, you can find it in Everyday Calculus: Discovering the Hidden Math All around Us by Oscar Fernandez. This problem is in Chapter 1 which is available free here [PDF].

*According to the College of Veterinary Medicine at The Ohio State University, cats do not have the daily sleep-wake cycle that we and many other animals have. Rather, they sleep and wake frequently throughout the day and night. This is because cats in the wild need to hunt as many as 20 small prey each day; they must be able to rest between each hunt so they are ready to pounce quickly when prey approaches. Although their sleep cycle differs from ours, they do have a cycle and need to be ready to go as soon as they wake up.