Updated August 28: Download the PDF I presented at the Aug 2020 Seattle Quantified Self Meetup
I first met sleep expert Dan Gartenberg at the 2015 Quantified Self Conference, where he described a new sleep technology that could lengthen the amount of time a person spends in deep sleep, the most restorative kind of sleep. He believed that you could stay longer in deep sleep if you were exposed to a sound at a particular wavelength1, and at the time he was working on an early prototype of an iPhone app that would do just that. Back then I tried an early beta version of the software, and found anecdotally that it seemed to help me sleep better, but it was difficult to use and annoyed my light-sleeping wife.
Now after many iterations, Dan’s company, recently renamed SleepSpace offers a much-improved version of the app that integrates with the Apple Watch to more accurately spot the period of deep sleep, so for the past two months I’ve been testing it.
I’ve yet to find a sleep-tracking product that can compare to the Zeo headstrap, which despite its own limitations seemed to be the gold standard for consumer sleep devices. For the past year or so I’ve been using Tantissa’s Autosleep app with somewhat mixed results; although it seems to accurately guess when I fell asleep and when I woke up, I can’t find much correlation with how I perceive to have actually slept that night. Nevertheless, I persist in measuring my sleep because (1) I do it passively through my Watch and it takes no special effort on my part, and (2) hope springs eternal that perhaps one day it will be useful to look back on my measurements to find some pattern that I can use in the future.
Both sleep apps, Autosleep and SleepSpace, let you download your raw data, so I read it into
R for the following analysis.
# autosleep_raw and sleepSpace_raw are data frames read from the CSV files. # Here I wrangle them slightly to make the rest of the analysis easier. autosleep <- autosleep_raw %>% transmute(bedtime = force_tz(bedtime, tzone = Sys.timezone()), waketime = force_tz(waketime, tzone = Sys.timezone()), deep = if_else(!is.na(deep),deep,0), date = date(bedtime), deepAve = deepAvg7, sleepBPM = sleepBPM, dayBPM = dayBPM ) sleepSpace_full <- sleepSpace_raw %>% transmute(bedtime = with_tz(as_datetime(Bedtime),tzone = Sys.timezone()), waketime = with_tz(as_datetime(Waketime),tzone = Sys.timezone()), sleep_wake = sleep_wake, ambient = ambient, duration = Duration, awakenings = Awakenings, elapsed_time = elapsed_time, hr = heart_rate_mean)
SS is a logical variable representing a night that I was running the SleepSpace app and presumably was receiving that special sound into my ears whenever I fell into deep sleep. The bars in red are nights when I was not using the app. You can see that I started using the app regularly in July.
t <- sleepSpace_full$waketime %>% as_date() %>% unique() %>% na.omit() %>% as_tibble_col(column_name = "date") %>% add_column(SS=TRUE) %>% full_join( autosleep %>% mutate(date = date(waketime), deepSeconds = period_to_seconds(hms(deep)) )) %>% mutate(SS = if_else(!is.na(SS), TRUE, FALSE)) t %>% transmute(date,deepSeconds, deep = seconds_to_period(seconds(deepSeconds)), SS = factor(if_else(SS, "Yes", "No"))) %>% ggplot() + geom_boxplot(aes(y=deepSeconds/3600, x = SS, fill = SS), varwidth = TRUE, show.legend = FALSE) + labs(title = "Deep Sleep and SleepSpace", y="Deep Sleep (hours)", x = "Slept Using SleepSpace")
t %>% transmute(date,deepSeconds, SS = factor(if_else(SS, "Yes", "No"))) %>% ggplot(aes(x=date,y=deepSeconds/3600, fill = SS)) + geom_bar(stat="identity") + labs(title = "Deep Sleep and SleepSpace", y="Deep Sleep (hours)", x = element_blank())
library(kableExtra) options(kableExtra.html.bsTable = TRUE) t %>% group_by(SS) %>% summarize(n(), mean(deepSeconds)/60, sd(deepSeconds)/60 ) %>% knitr::kable(col.names = c("SleepSpace","Nights", "Deep Sleep\n(Minutes)", "SD" )) %>% kable_styling(bootstrap_options = c("striped", "hover", "condensed"))
|SleepSpace||Nights||Deep Sleep (Minutes)||SD|
and a quick t-test shows a p-value of 0.007, comfortably within the range of statistical significance.
t.test(dplyr::filter(t,t$SS==TRUE) %>% pull(deepSeconds), dplyr::filter(t,t$SS==FALSE) %>% pull(deepSeconds))
## ## Welch Two Sample t-test ## ## data: dplyr::filter(t, t$SS == TRUE) %>% pull(deepSeconds) and dplyr::filter(t, t$SS == FALSE) %>% pull(deepSeconds) ## t = 3, df = 89, p-value = 0.007 ## alternative hypothesis: true difference in means is not equal to 0 ## 95 percent confidence interval: ## 580 3507 ## sample estimates: ## mean of x mean of y ## 6780 4737
My deep sleep varies a lot – about an hour on average each night – so I’ll need much more data to say clearly whether this is a real pattern, but so far so good.
Conclusion: after about a month of using the SleepSpace app, I’m getting about half an hour of additional deep sleep per night.
A few things have changed since I began this experiment:
- I’ve been traveling a lot, vacationing with my family in multiple different locations with varying levels of exhaustion depending on the level of activity that day.
- I’ve slept alone for several of the nights when my wife was away from me. This lets me blast the SleepSpace deep sleep sounds more loudly than I otherwise would.
Since my travel started on July 31, I re-ran the data to include only the nights since then.
|SleepSpace||Nights||Deep Sleep (Minutes)||SD|
and a quick t-test shows a p-value of 0.234.
## ## Welch Two Sample t-test ## ## data: dplyr::filter(t, t$SS == TRUE) %>% pull(deepSeconds) and dplyr::filter(t, t$SS == FALSE) %>% pull(deepSeconds) ## t = 1, df = 31, p-value = 0.2 ## alternative hypothesis: true difference in means is not equal to 0 ## 95 percent confidence interval: ## -953 3750 ## sample estimates: ## mean of x mean of y ## 6566 5167
August 29 Update:
That Deep Sleep Stimulation Feature woke me up in the middle of the night and I wasn’t sure how to turn it off. Autosleep says I wasn’t even in Deep Sleep when it happened.
September 3 Update:
I reran the numbers above one more time.
Schade, M. M., Mathew, G. M., Roberts, D. M., Gartenberg, D., & Buxton, O. M. (2020). Enhancing Slow Oscillations and Increasing N3 Sleep Proportion with Supervised, Non-Phase-Locked Pink Noise and Other Non-Standard Auditory Stimulation During NREM Sleep. Nature and science of sleep, 12, 411–429. https://doi.org/10.2147/NSS.S243204↩︎