Open

One of our great concerns when developing Pillow was how to format our sleep diagrams in order to depict sleep patterns in the best possible way. We had to find a way to combine two different needs: the requirement to show data as accurately as possible and also to provide a diagram that wouldn’t be too complex for the users to understand. Before delving into why we ended up with our sleep analysis diagram, let’s see what happens when a person is sleeping.

How sleep works

According to the universally accepted sleep studies, sleep can be divided in 4 stages and 2 categories, namely Rapid Eye Movement (REM) and Non-REM (NREM). The stages are:

  • N1 (NREM): It’s the first stage of sleep, where a person is between wakefulness and sleep. Muscular and eye activity is present in this stage and it’s the easiest sleep stage to wake from.
  • N2 (NREM): In this stage the person asleep becomes harder to wake. The muscular activity slows down significantly but one still reacts to environmental stimuli (noises, light etc). Along with N1, they can be considered as Light Sleep.
  • N3 (NREM): Also known as Slow Wave Sleep (SWS), it’s what we would casually call Deep Sleep. There is practically no muscular and eye movement and the person asleep is not reacting to most environmental stimuli.
  • REM: In REM sleep, also known as the dream stage, things are getting more complex. While the person asleep exhibits high brain activity, comparable to being awake, it’s the hardest sleep stage to awake from and at the same time the muscles are completely paralysed. The muscle paralysis is considered to being a safety mechanism in order for the sleeper not to violently react in vivid dreams. Although the precise effects of REM sleep are still under research, it’s considered to be very important for increasing the brain’s ability to learn complex tasks.

During a sleep session, the different stages alternate in successions that are called sleep cycles. The order in a complete sleep cycle is normally N1, N2, N3, N2, REM. A sleep cycle lasts for about 90 to 110 minutes in adults and time in each sleep stage varies, with deep sleep occupying the first hours after getting asleep while REM increases during the sleep cycles before natural awakening. An adult without sleep disorders is expected to spend about 20% of his sleep time in REM.

hypnogram

Sleep Diagrams in Pillow

The most common pattern sleep apps use to depict the different stages during a sleep session is that of a continuous line oscillating between the different sleep stages. To be honest, that was the first thing we tried with Pillow as well, but we found out that there are is a major problem with this approach.

A continuous line has the inherent disadvantage that certain points would fall between sleep stages. But, according to sleep research, sleep stage transitions can occur in an instant. Furthermore, there is no scientific definition for being between two sleep stages: your sleep always falls into exactly one of the aforementioned stages and not somewhere in-between. So, a curved, continuous line would not provide accurate information. It may be suitable for showing the level of motion during the night, but not for depicting the sleep stages. This is in accordance with how Hypnograms look like: what you get is a stepped line and not a curved one, exactly because the transitions between sleep stages happen instantaneously.

Of course, anyone could object that Hypnograms rely on EEG, measuring the exact activity of the brain, something impossible to be done with a smartphone. So, since most of sleep apps measure motion during the night through the device’s sensors, it would be more appropriate to present the level of movement instead of the sleep stages. While this may stand true for many of the sleep apps on the market, it’s not the case in Pillow. In our app, except tracking motion, we use the device’s microphone to detect fluctuations in sound levels during the night, and combine all of our data through a Markovian model to assess the sleep stage a user is currently in. The precision is not (and cannot ever be) equivalent to that of a specialised device but we believe it’s very good given the capabilities of the device.

So, hypnogram seemed like the best fit for showing our sleep analysis. We went a small step further, giving the various stages a different colour, in order to make it even more legible to the average person without sacrificing the quality of the provided information.

Sleep quality

Apart from the sleep analysis, Pillow gives each sleep session a quality score as a percentage. Let’s dive into a bit more depth on how this is calculated.

It’s fairly obvious, that the efficiency of our sleep is not always the same. We feel that some nights we sleep very good, waking up rested and full of activity while in other cases even 8 hours of sleep can leave us groggy and unsatisfied. The truth is that sleep efficiency is depending on a large variety of factors except sleep time. Thanks to the capabilities of modern devices we can measure many of these parameters including the sleep cycle duration, the percentage of sleep time in each stage, the disturbances through the night, the environmental noises and the times awakened to name a few. Based on these measurements and using scientifically accepted sleep quality assessment methods, we calculate a sleep score (sleep quality) which is presented as a percentage, since it’s the universally most easy to understand scale.

As we said above, nothing can be perfectly accurate and since self reporting has proven to be of major importance in understanding sleep, starting from version 1.2 we added Pillow a couple of features that will help users correlate the calculated quality with their personal feeling of their sleep. Mood reporting allows anyone to easily record their mood when waking and compare it with the sleep quality calculated by the app. Sleep Notes also help users registering information regarding their sleep that cannot be tracked by the app (for example large caffeine consumption, being sick, being very tired etc). By using advanced tracking in combination with self-reporting we tried to give a tool that will truly give the opportunity to understand sleep much better.

If you choose to give Pillow a try, we'll be more than happy to receive your comments on how our sleep tracking works for you.