I sleep less when I exercise more
They say exercise improves sleep quality. Is that true for me?
To test this hypothesis, I took my daily calorie expenditures from the Apple Health app and correlated them with that night’s sleep time.1 I also included caffeine intake as a potential confounding variable.
The hypothesis: when I exercise more, I’ll get better rest that night, and therefore wake up earlier.
The results:2
| name | coef | t-stat | p-value |
|---|---|---|---|
| intercept | 9.0134 | 65.072 | 0.0000 |
| calories | -1.6844 | -6.967 | 0.0000 |
| caffeine | 0.4157 | 9.404 | 0.0000 |
| R² | 0.2409 |
I sleep 10 minutes less for every additional 100 calories of exercise. Exercise plus caffeine explained 24% of the variance in my sleep time; exercise alone explained 6.6%.
The trend shows up whether or not I have caffeine:

Data are binned into increments of 100 calories. Any bins with fewer than 5 data points are not displayed. Vertical lines show the 95% confidence intervals for each bin.
Continue reading