http://www.ably-health.com/2021/10/sleep-calculations.html