How to measure your sleep data

Run a sleep experiment, step by step (part 2)

Ismail Elouafiq
7 min readMay 30, 2020

--

How can we take measurements to study our sleep? What should we know about the sleep devices we use? What can we do if we do not have any fancy sleep apparel?

Note that this is part 2 of a three-part series on
How to run a sleep experiment”:

  • Previously, in part 1, we talked about experimental design. Or how to plan the experiment.
  • This part, part 2, focuses on how to take careful measurements (from heart rate measurements to subjective measurements).
  • In the next and final part, part 3, we will talk about how to analyze the results at the end of the experiment.
origin: Calvin and Hobbes comics

What to do when you do not have a device?

Maybe you do not want to invest in a device to measure sleep-related markers. Maybe you want to start with something simple before investing in such a device.

Well, as we’ve talked about in part 1, this depends on what the hypothesis we are trying to test is.

As an example, if we want to see the improvements in the resting heart rate during sleep. Then we would need to be able to get measure the resting heart rate during sleep. Duh!

But what we can test are other variables that do not necessarily require a device, such as:

  • Time in bed: Simple as that: what time did I go to bed yesterday? What time did I wake up today?
  • Subjective sleep quality: this is a fancy way of saying: that whenever I wake up, I can assign a score (from 1 to 10 for example) to the quality of sleep that I feel like I had that night. This is why this measure is entirely subjective. But sleep quality can be interpreted differently on different days, so we can be more specific.
  • Subjective energy level on wake-up: similar to the previous one, but the score will represent how much energy I have when I wake up.
  • Subjective sleep latency: yet another subjective score to how long it took me the previous night before sleeping. Or how fast I “feel” like I went to sleep after going to bed.

There could be other subjective measurements indirectly related to sleep:

  • subjective productivity/anxiety level: although not directly related to sleep, it can be a way of seeing how sleep affects productivity or anxiety.
  • subjective energy level during a workout: although not directly related to sleep. But if a person is used to running every morning, their quality of sleep can “possibly” be reflected by the energy levels they “felt” during the day.

We should really really (really) be careful when taking subjective measurements. Because these will tend to be very biased, by the simple fact that we are the ones deciding on the numbers to put.

For example, if I am trying to run an experiment to see the impact of a humidifier on my sleep quality. And I paid a lot of money for that humidifier. Then I will have a tendency to give a better sleep score when I used the humidifier. This can be placebo. But it can also just be that I do not want to feel bad for buying that humidifier, and I want to prove to the world that it was worth it.

So what do we do then? Well, we should at least keep it in mind during the analysis. And admit that our measurements are biased.
If you do have some familiarity with statistics, and you really have time to spare, then there are ways of reducing these biases: such as a method known as Hidden Markov models which I had talked about in the past. This means that you will consider the “actual sleep quality” as a hidden value, of which we observe a “subjective sleep quality”. Then we can reduce the bias of the “subjective sleep quality” observation during the analysis. If you want to know more about how to do this let me know in the comments ;)

For more stuff like this, sign up at https://www.ismail.land/subscribe

How about measurement devices?

Here are some simple rules to follow:

  • Two devices can have different values for the same measurement.
  • The same device can have different values for the same measurement. I personally always start with some exploratory data analysis before using a device for an experiment.
  • Focus on trends
  • Use the same device whenever possible

What devices can be used for sleep and how?

Here are the devices I personally use (ps: I am not affiliated to any of them):

  • The Oura ring, and I love it.
  • The Keto Mojo, to check blood ketone levels and glucose levels upon wake up.
  • The Freestyle Libre to see the curve of glucose variation during sleep.

I know, it sounds weird at a first glance to see glucose and ketones used for sleep. But these can tell us a lot. For example, lack of sleep can impact glucose metabolism and glucose variability can impact sleep as well.

Devices can (read: most certainly do) have errors in their measurements. Be aware of how consistent the device you’re using is. Since we are comparing the trends in this case.

So before buying any device, check existing research and reviews about what it can measure, how accurate it is, and how it should be used properly. For example, I consider the following when using the above devices:

  • The Oura ring is more accurate in predicting if you’re asleep or awake. Not the exact time for different sleep stages. It is also better to use the Oura ring to track the trends in sleep stages, not the exact amount. The heart-rate measurements seem to be consistent and accurate. But the measurements and accuracy depend on how the ring fits on the person’s fingers as well as how stable it is during sleep. (If you move your hands too much the ring cannot accurately predict heart rate)
  • The Freestyle Libre measurements can differ from one sensor to another, so I cannot really compare data from two different sensors. Because these sensors can only stay on a person’s arm for up to two weeks, I cannot run an experiment based on this data where I have the same treatment for more than two weeks. This is also due to the fact that it depends on where on the arm the sensor was placed.

The main important things to take away from this is that:

  • We can focus on the trends (i.e: how does glucose vary instead of what is the exact value for glucose).
  • If we compare results from one treatment to another, the measurements should be on the same device and measured in a similar way.
  • We can increase our accuracy by using more than one device (for example wearing two smartwatches) if we really want to invest in that. This can enable a better analysis in the end.
  • Finally, when we analyze the results, we should be clear about which devices these measurements were taken from, and make sure to correct for noise and other factors.

Of course, it would be more accurate to use electrodes stuck to your head as they do in actual sleep studies. But for most of us, that is not the most practical way to go.

Finally here’s a list of other devices that I have NOT used personally such as:

  • Smartwatches from Garmin, Withings, Fitbit, the Apple and Samsung.
  • Heart rate monitoring solutions such as the one from EMFIT
  • Under-mattress trackers like the one from Withings, or Beddit.
  • Continuous glucose monitoring sensors from Dexcom.

What next?

After we gather these results, it would not make any sense if we do not actually analyze them. We will go through this in the upcoming final part of this series. If you would like to keep up to date you can sign up for my mailing list here ;)

That’s all folks! If you liked this post please give it some claps

For more stuff like this, sign up at https://www.ismail.land/subscribe

Disclaimer:
This content is for informational purposes only. This content is not intended to be a substitute for professional medical advice, diagnosis, or treatment. You must consult with a health-care practitioner, before undertaking any of the exercises, habits, protocols, techniques or otherwise.
This content does not constitute the practice of medicine or any other professional health care services, including providing medical advice. The use of information on this post is at the user’s own risk.

--

--