Heart Rate Variability tracking with Sleep As Android

Working hard? Sporting actively? Being dragged into destructive habits? Not getting enough rest? Get a new level of insight into your bodily processes and the quality of your sleep. We proudly announce a new feature in Sleep as Android, monitoring heart rate variability via a wide range of wearable devices. Read on to learn more.

What is Heart Rate Variability?

It is no surprise that heart rate keeps changing all the time. It may rise to 180 bpm during intense exercise and fall as low as 40 bpm during deep sleep. 

A less known fact is that heart rate keeps fluctuating on a short time scale. Even if one is lying still, relaxed, the oxygen need of the body is stable, and there is no apparent reason for such variations.

The following picture demonstrates such fluctuation during 5 minutes, recorded on my own heart. The line represents gaps between individual heartbeats (so-called R-R intervals) in milliseconds. The average heart rate was 55 bpm, but the values were jumping between 45 and 65 on a short time scale – quite a wide range.

This phenomenon, called heart rate variability, or HRV, was discovered decades ago and has been intensely studied ever since. The current need for oxygen is not the only factor that controls the function of the heart. Today, we know of dozens of other factors, such as blood pressure, breath frequency, digestion, stress level, or medication, that contribute to the control of heartbeat. 

Even if the body is seemingly still, relaxed, and doing nothing, all these factors keep fluctuating, and the heart responds accordingly by random fluctuations of its beat. A healthy heart is not a metronome, and a certain level of variability is a normal function. Medical research has shown that too low variability may indicate various diseases, chronic stress, sleep deprivation, and much more.

There are countless resources on the Internet where you can learn more about this phenomenon and its health implications. Start with a popular introductory article, dive into an extensive scientific treatise, or simply try your luck with Google.

New: HRV tracking in Sleep As Android

Our app, Sleep as Android, integrates with a range of wearable devices that record individual R-R intervals. With these devices, you can now monitor HRV during your sleep and get a new level of insight into your physiological processes and the miraculous power of sleep. Here is how it works.

1. Get a supported device

  • Polar H7, H10, or OH1. Recommended, tested.
  • A pulse oximeter from Happy Electronics. Recommended, tested.
  • Any device that implements the BLE Heart Rate Profile. It’s an open standard supported by various fitness trackers or health monitors. If you happen to have such a device at home, you can try to connect it with our app, and hopefully, it will work.

2. Connect it to the app, according to the documentation

3. Sleep with the device

Track your sleep, wearing the device. New information, showing your HRV analyses, appears in the sleep details chart, as well as long term statistics charts, as described in the following sections.

Short-term HRV chart

Apart from the heart rate (red line), the sleep record detail chart is now showing a violet line, depicting HRV development throughout the night. Each point on the violet line represents HRV (SDNN, in particular) for a 5-minute interval. 

The screenshot displays a typical night of mine. The first thing to notice is that the HRV curve closely corresponds to the amount of physical activity. It gets much higher in the light sleep phase, partly due to the simple fact of the body turning and tossing more intensely, partly due to internal processes related to the REM phase.

The parts that we should focus on instead are the lower values during the deep sleep phases when the body is completely still. The values then represent the natural variability of a free-running heart. These valleys are typically lower when one goes to bed very tired (a tough day at work, heavy exercise), and they get higher during the night as the body and the mind get refreshed. In the picture above, it grew gradually from 17 at the beginning of the night to more than 40 in the valleys at the end.

The actual values vary heavily among different people. We cannot generally pinpoint a “good” or “bad” number. However, they make sense in a longer-term individual context. You will surely notice these developments, having followed your HRV measurements for some time.

A Drunken Marathoner’s Chart

Compare the previous screenshot with this one.

Solely for the sake of education and enlightenment of myself and the readers, I underwent a dangerous experiment of drinking more than just a couple of beers.

The effects are obvious. The heart is boosted by the alcohol, it beats much faster than normal, and the variability gets close to zero. The values get better throughout the night, but they never return to my normal resting values.

Even though the drinker may seem to be sleeping happily, the actual nature of the underlying physiological processes is very different from normal healthy sleep.

I also get very similar readings after an unusually heavy exercise, such as running a marathon. The body is completely exhausted by the unaccustomed performance, and even a whole night of good sleep is not enough to fully recover.

Some professional coaches are using this kind of HRV analysis to monitor the training progress of athletes and to adjust their training load.

Resting HRV Before Awake

From the short-term HRV charts demonstrated above, we extract a single number that should correspond to the overall quality of your rest. We take one of the lower readings at the end of the night (technically, the 10th percentile from the last two hours) and call it HRV Before Awake. Analogously, we compute the same statistic for the first 2 hours (HRV after onset). Sleep record detail displays the two values at the bottom:

When you go to bed after a hard day and have a night of good quality sleep, the “After” value tends to be way higher than the “Before”. However, if you are not that tired in the evening, the value may remain roughly the same.

There are new items on the Charts/Trend screen. “HRV before awake” shows, well, the long term development of the HRV before awake.

“(+) HRV before awake” combines both values (after onset, before awake) in a single chart. Each night is represented by a bar, showing the two data points. If HRV increased during the night, the bar is violet, otherwise red.

This is a proprietary method that we invented to accommodate the fact that we measure the heart activity only during sleep and we need to find the representative values in a bunch of noise.

There is another approach, used by some health/fitness apps: The measurement is taken every morning just after wake-up, recording the heart for several minutes, before getting off the bed and starting usual daily activities.

Most people find this procedure too demanding. Some simply do not have the extra few minutes in the morning, others fall asleep again during the measurement.

If you are among those who are willing to adopt this regular routine, you may want to try an app specialized in this task, StressLocator by Happy Electronics. It may provide more detailed insights, as the measurements are taken under controlled conditions and permit different methods of analysis.

Total HRV for a night

Another statistic shown in the app is SDANN, which is a single number that nicely summarizes the total amount of heart rate variability throughout the entire night, including all the local minima and maxima.

Again, the values tend to vary heavily across the population, and it is difficult to pinpoint concrete “good” or “bad” readings. Some papers suggested normative values based on large-scale clinical studies. However, it makes more sense to watch the statistic in the individual context, and a decreasing trend may indicate an unfavorable condition like chronic stress and lack of proper sleep.

SDANN for a particular night is displayed in the sleep record detail,

and the long term trend can be monitored in Charts/Trend/HRV.

Try it out

All these features will be available in the next release of Sleep As Android. We are rolling them out in beta as of now, and a stable release will follow, hopefully in a few weeks.


10 thoughts on “Heart Rate Variability tracking with Sleep As Android

  1. Great news! I hoped the last two years, that you will once offer hrv…

    What your readers should know about OH1: it tracks also the movements during sleep.

    So I ordered an OH1 yesterday.

  2. I was able to track hrv with my Mio Fuse, which was pleasantly surprising. My Mio Slice only reported HR, which is disappointing. What do we need to look for to determine if a wearable hrm supports hrv?

  3. Hello Michael,

    In the first place, the device needs to support so called Heart Rate Profile (https://learn.adafruit.com/circuitpython-ble-heart-rate-monitor-gizmo/heart-rate-service), which is an open protocol for transferring heart rate measurements over Bluetooth. Both Mio Fuse and Mio Slice seem to support it as you would not have seen HR otherwise.

    There is an optional item in this protocol, called RR Intervals, which are time intervals between every consecutive pair of heartbeats. We need this data to calculate HRV. Apparently, some devices do not provide this data.

    It may be difficult to find this information in advance. Technical specifications provided by the vendors often do not go into this level of detail. One can try to contact their technical support, or search Internet fora.

    Best Regards


  4. Hello Joe,

    Yes, we are planning to integrate HRV on Garmin too.
    Although I can not promise any concrete schedule at this moment.

    Best Regards


  5. Hi – the final graph of my sleep session is not displaying HRV data despite being paired with my polar h10 and showing the collected heart rate data. Any idea how to correct this? Thanks. Tom.

  6. Hello Tom,

    Please, send us a bug report from the app: the top-left-corner menu -> Report a bug.

    It attaches diagnostic information that helps us to tell what is going on.

    Thank you


  7. In the line:
    > When you go to bed after a hard day and have a night of good quality sleep, the former tends to be way higher than the latter. However, if you are not that tired in the evening, the value may remain roughly the same.

    Is “the former tends to be way higher than the latter” a typo? Shouldn’t it be the latter tends to be way higher than the former (e.g. end of sleep number is higher than sleep onset number)?

  8. Thank you Tort, you are right, the wording is unfortunate. It is ambiguous. The former/latter refers to the fact that “HRV before awake” is mentioned before “HRV after onset” in the previous paragraph. I will fix it.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.