About 5 or 6 years ago, I decided to form better sleep habits. I had spent too much of the previous decade in sleep deprivation and even when I was getting sufficient quantities of sleep, my bed times were wildly inconsistent. In graduate school, I had made such a habit of neglecting sleep that my memories of those years are fragmented. I would like to say that that having kids is what prompted me to give up my unhealthy sleep habits, but even when we had three kids, you would still often find me up well past midnight on weeknights. In some ways, having kids made things worse since the night time hours were relatively quiet. I liked having uninterrupted time to focus on projects and 10pm until 4am were hard to beat. Eventually, though, general concern for my health prevailed and I adopted a reasonable bedtime and committed myself to no less than 8 hours of sleep every night. I don’t regret it.
For me one of the most challenging parts of committing to a bedtime is how often I would crawl under the covers before I felt tired. Many nights, I stared at the ceiling for an indeterminate amount of time before I would fall asleep. This would make it nearly impossible to say with any certainty whether I was meeting my sleep goal. I wanted a way to measure my sleep but at that time, sleep trackers were rare and cumbersome. A few years later, I soldered together some hardware and started trying to track my heart rate throughout the day and night. It was a fun project, but I quickly realized that wearing a heart rate strap 24/7 was impractical and uncomfortable. Additionally, I was going through CR2025 batteries at an alarming rate. I gave up on the project and lost interested in tracking my sleep for a while.
Then in 2016, Mailchimp gave each of its employees a Fitbit Charge HR as a holiday gift. It took me a few months of wear to realize that I now had the sleep, heart rate and movement tracking that I had always wanted. Unfortunately, the FitBit literally fell apart before I had the time to collect any significant data on my sleep habits. I even replaced that FitBit with a second one that also quickly fell apart. I’m told that the higher end FitBit devices are more rugged but I gave up and switched to a Garmin device. The device itself is great. I’ve been wearing it almost continuously for over 2.5 years and rarely experienced problems. I also find Garmin Connect, the web UI where the device data is surfaced, to be a pleasant product for regular use. The one big downside, though, Garmin Connect doesn’t really offer an API. “Enterprise partners” can request access to their Health API. Based on the request form, I assumed that I would not qualify as an enterprise partner. In order to extract the data for my own personal analysis, I had to resort to a bit of reverse engineering. Ultimately, I was able to “liberate” almost two years of continuous sleep, heart rate and movement data. In this post, I'm going to use that data to determine if I've really been meeting my sleep goals in 2019 and to look for ways to improve in 2020.
This year has been a non-typical year for me and my family. For almost half of the year, we were living in a small, temporary rental while our hurricane damaged house was repaired. I expected to see periods where I struggled to maintain my sleep schedule. During the first half of May, for instance, we had moved out of the rental but were still unable to move back into our house. On the whole though, I expected to find fairly consistent sleep patterns that regularly fell just short of my 8 hour nightly target. I was right.
My sleep times for 2019 are shown below. Days that are missing were not recorded. That generally means that I wasn’t wearing my Garmin watch as I slept.
Recall that my goal is to get at least 8 hours of sleep every every night. On average, did I accomplish that goal? Almost. Below are averages for my sleep. Since my sleep patterns are different on the weekends, where I tend to stay up a bit longer and sleep a little later, I've also broken out those averages. The time ranges that are noted are standard deviation, so roughly 70% of nights fall into the range shown.
While I'm not quite meeting my goal of 8 hours each night, there is still plenty of reason to be proud of these numbers. In 2017, FitBit looked at similar averages for their millions of users and it seems I'm getting way more sleep that the average FitBit user, which is only 6 hours and 38 minutes nightly.
Looking at the average time I sleep every night, I'm only about 5 minutes off of my goal. If, however, you look at the percentage of those nights when I meet my 8 hour sleep goal, it's only 42.6%. Of the 331 days where I recorded data, 190 of those fell below 8 hours of sleep. So what can I do about those 190 nights? I could go to bed earlier, I could sleep later, or I could somehow reduce the amount of time I'm awake during the night. Unsurprisingly, the biggest opportunity to improve seems to be getting to sleep by 10 pm every night. In fact, if I would have been diligent about being asleep at 10 pm every night, I would have met my 8 hour sleep goal 61.6% of the time. Focusing on when I get up, or trying not to wake up during the night would not have near the same impact. So clearly, in 2020, I need to get my ass to bed. Speaking of which, it's currently midnight and I'm still writing this post. Good night.