How sleep tracking works

During the night, your body follows certain sleep cycles. It goes from light sleep to deep sleep and occasionally into the REM-sleep, where dreaming occurs.

Sleep as Android uses method called actigraphy. Based on this method, the app will visualize how you sleep, give you feedback and wake you up at the right time.

Sleep actigraphy

Actigraphy is basically measurement of your movement. We use this method to recognize your sleep phases. Actigraphy is backed by scientific research which shows that it provides comparable outputs to PSG (for details, see our FAQ).

The biggest advantage of actigraphy is the simple setup which makes it perfect for everyday use in home conditions.

Every smartphone is capable of doing actigraphy, either with:

  • the built-in accelerometer (phone placed in your bed), or
  • using microphone and speaker in a special way as a sonar (phone placed on your bedside table).

Those ways are nearly equivalent in the results they produce.

In deep sleep, your muscle movements are suppressed – the sleep graph gets nearly flat.
During light sleep, you tend to toss and turn which manifests as significant peaks in the sleep graph.

Your body movements are directly related to your current sleep phase. In general, the more movement the lighter the sleep.

Measuring your sleep cycles allows us to do two important things:

  1. Smart wake up – you set up a time range when to wake up (say, 6:30 to 7:00) and we’ll wake you up in the best moment for pleasant wake-up and a head start into your day (for details, see Alarms)
  2. Create a sleep graph and compute your sleep score – an all-encompassing statistic that shows whether your sleep is healthy ranges

REM phase detection

REM phases are not directly detected from your body movements. Rather, the estimation is based on statistical analysis.

When there is a long enough deep sleep period, followed by a long enough light sleep period, we mark the first half of the light sleep (after a short initial offset) as REM. There is no way to tell if there actually was REM at any particular moment, based solely on aggregate activity data. But the approach is statistically valid. On average, the overlap of the actual REMs with the REMs marked on our charts is much better than just random, and we are really getting close to the limits of what can be inferred from smartphone inputs.

For detailed picture on how we measure REM, see Jan’s excellent article How do we measure your dreams.