Improving Sleep-Wake Schedule Using Sleep Behavior Visualization and a Bedtime Alarm

Humans need sleep, along with food, water and oxygen, to survive. With about one-third of our lives spent sleeping, there has been increased attention and interest in under-standing sleep and the overall state of our“sleep health.”The rapid adoption of smartphones along with a growing number of sleep tracking applications for these devices presents an opportunity to use this device to encourage better sleep hygiene. Procrastinating going to bed and being unable to stick to a consistent bedtime can lead to inadequate amount of sleep time which in turn aﬀects quality of life and overall wellbeing. To help address this problem, we developed two applications, Lights Out and Sleep Wallpaper, which provide a sensor-based bedtime alarm and a connected peripheral display on the wallpaper of the user’s mobile phone to promote awareness with sleep data visualization. In this paper, we describe Lights Out and Sleep Wallpaper and results from a two-week ﬁeld study with 19 participants who have a variety of sleep contexts. Results indicate that a sim-ple bedtime alarm and a peripheral display with sleep data visualization can be an eﬀective method for improving sleep consistency.


INTRODUCTION
Sleep is a physiological process essential for our wellbeing.Healthful sleep has been empirically proven to be the single most important factor in predicting longevity, more influential than diet, exercise, or heredity [3].Among all factors affecting sleep, a consistent bedtime plays a vital role.
Sleep consistency is associated with sleep quality.It is suggested that having a regular bedtime schedule can strengthen the circadian rhythm, and is beneficial for achieving good quality sleep [1].In an experiment those who kept a regular sleep-wake schedule reported greater and longer lasting improvements in alertness and improved sleep efficiency compared with those who slept the same amount of time but not on a regular schedule [5].Furthermore, studies in lab settings have shown that even a one night shift in sleep schedule of 2 hours, with no alteration of total sleep duration, can decrease cognitive and psychological functioning [6,7,8].Sleep consistency is also associated with sleep sufficiency.Intuitively, procrastinating going to bed may lead to fewer total hours spent sleeping due to work or other obligations in the morning.This relationship has been shown in a study [4], where an increase in bedtime schedule irregularity was found to be significantly associated with a decrease in average sleep time per day among Taiwanese college students under real life conditions.
There are several commercial and research applications designed to track and improve sleep.Commercial examples include Sleep Genius1 , an audio app for mobile devices that uses neurosensory algorithms to drive sleep-inducing vestibular responses, which have been shown to reduce sleep latency in elderly people [9] and enhance quiet sleep in premature infants [2].Sleep Rate 2 , composed of an app and a heart rate sensor, can track and assess your sleep and create a personalized sleep improvement plan based on the assessment.Other examples include the FitBit 3 , SleepBot 4 , and Microsoft Band 5 , which track hours slept, provide smart alarms, track sleep quality and provide feedback and suggestions.However, all these focus on sleep duration instead of sleep consistency, and waking up instead of going to bed.Compared with them, our work centers on sleep consistency by encouraging the user to create and be aware of consistent sleep schedules without requiring wearable hardware.This work has three primary contributions.First, it uses a peripheral display in a new application space of promoting sleep consistency.Second, for the first time, built-in sensors of smart phones are employed for the monitoring of the human behaviors related to going to bed.Third, our results show that the usage of our applications led to more consistent sleep-wake schedules in a 2-week field study.

APPLICATIONS DESIGN
Lights Out is a digital alarm application with an animated agent (a bear) that reacts to user input.When the user sets a bedtime alarm, the bear encourages the user with a visual display of excitement and accompanied audio.When the user continually snoozes their bedtime alarm in the evening the bear yawns to indicate bedtime to nudge the user into adhering to their sleep schedule.A pre-alarm goes off 30 minutes before the actual alarm in the evening with an audio prompt asking the user to "get ready for bed" and the user indicates having heard that prompt by tapping the "Got it" button on the notification pop-up display.At this point, ambient light, proximity, and accelerometer sensors on the device begin recording data.If during this 30 minute period, the user turns off their light and is no longer actively using their phone, the actual alarm is disabled with the assumption that the user has likely gone to bed and sounding the alarm will be disruptive.However, if all sensors indicate active use then a lullaby is played at the actual scheduled alarm time.The user can disable the lullaby alarm ringtone by switching off lights and putting the phone down, or choose to snooze the alarm, which then causes the sleepy bear animation to play.There is no limit on the number of times the user can snooze the alarm.The alarm ringtone and pre-alarm duration are both user customizable in the app settings.
Sleep Wallpaper uses a glanceable peripheral display to show user sleep schedule, which runs as the active wallpaper and lock screen image of the user's mobile phone.Each night the user goes to bed within 30 minutes of the previous night's bedtime, a butterfly is added and displayed on the wallpaper.At the end of 6 continuous days of consistent bedtime, a unicorn is added to the wallpaper.The unicorn represents a weekly aggregate and a butterfly represents a one day timeframe.By default the wallpaper displays a green grassy field and blue sky which fills up with butterflies over time.
Both apps were implemented on Android, and required Android 4.1 or higher.

USER STUDY
To investigate Lights Out and Sleep Wallpaper's impact on people's sleep-wake schedules, we conducted a 2-week field study.During the two weeks, each participant was asked to maintain an electronic sleep diary including bedtime and wake-up time by using a free, commercially available and popular Android app SleepBot.Every morning participants were also sent an email reminder to fill out a sleep quality survey for the previous night (see Morning surveys in Fig. 2).
Participants used SleepBot exclusively for a week as the control followed by using SleepBot along with our apps, Lights Out and Sleep Wallpaper for the second week.Lights Out saved the time at which a user was determined to have fallen asleep (based on light and accelerometer sensor data) to a text file on the device and used this data as input for the Sleep Wallpaper.Based on consistent sleep time on subsequent days, butterflies were added one by one to the Sleep Wallpaper and were visible to the participants every time they unlocked their phone for use.
After the experiment, we asked each participant to fill out a final survey (see Final survey in Fig. 2) to provide feedback on their experience and the app designs.

RESULTS AND DISCUSSION
Participants were recruited via email.We did not have specific criteria on the age, gender or other demographics of the participants.33 people replied to our recruitment email.After eliminating those without an Android phone or with an Android system older than version 4.1, we invited 27 respondents to attend our initial orientations.19 participants attended our orientation sessions and filled out the consent form.
After the two-week study, we received 254 daily surveys, 19 final surveys, SleepBot data for 189 nights, and Lights Out data of 65 nights.All the measures in the data and surveys are shown in Fig. 2.
Fig. 2 also shows the hypotheses of our study, in which the entries with stars are our basic expectations.Since our study focuses on improving sleep consistency, we expected the variance of our participants' bedtimes would become smaller during the second week, and the participants would feel they were more capable of managing their sleep-wake schedule when using our apps.As we mentioned in the Introduction section, sleep consistency is associated with sleep quality and sleep sufficiency.Thus it is possible that the usage of our apps may also affect participants' sleep duration and quality, and consequently their mood, health and stress levels.However, the causal relationships between app usage and the changes in these metrics are indirect, thus their corresponding hypotheses in the figure are beyond our basic expectations.
From the daily survey feedback and behavioral data recorded by SleepBot and Lights Out, we have the bedtimes of all participants for two weeks.In order to find whether participants' sleep consistency changed during the second week, the standard deviations of each participant's bedtimes were calculated for each week.Perhaps because the study was conducted with season transitioning from spring to summer, three participants reported in their daily surveys that they were sick during the experiment and that greatly influenced their sleep pattern.After eliminating their data, the statistics of all the remaining standard deviations are computed and shown in Table 1.According to the table, the bedtime standard deviations from two different sources both became significantly smaller during the second week (paired t-test, p < 0.05), which verifies that our apps can potentially improve participants' sleep consistency.
Though beyond our expectation, whether participants went to bed earlier during the second week is also an interesting question.To answer it, average bedtimes of all participants for each week and each data source were calculated and shown in Table 2 with p-values.According to the table, the average bedtime of participants did show an earlier time when using our apps, although the earlier time was not significantly different from the first week at the 5% significance level.SleepBot recorded not only the bedtimes but also the wake-up times of participants, so sleep duration can be calculated for each night.In the daily surveys, we asked participants about the number of times they woke up during the night, their energy level, affect, health and stress levels in the morning.The mean and standard deviation of each metric for the first and the second week are shown in Table 3. T-tests of their corresponding hypotheses in Fig. 2 were performed with the p-values calculated.The table shows the sleep durations of the participants became slightly longer, but they also woke up more times during the night.According to the mean values in the table, the participants felt more alert, happier, more energetic, healthier and less stressed in the morning when using our apps.However, only the change in their alertness levels was significant at the 5% significance level (p=0.0485).In the final survey, we asked participants to provide feedback on their experience and the study design.Among all the questions, the most important one is if participants felt they were more capable of managing their sleep-wake schedule when using our apps.The answers to this question are illustrated in Fig. 3 (a), in which more than half of the participants agreed that our apps helped them better manage their sleep schedule.This matches our finding that the participants' bedtimes were more consistent when our apps were used.Because we did not want to force our participants to turn off their lights or stop using their phone in order to turn off the alarm ringtone (lullaby), we added a snooze button on the pop-up window of the bedtime alarm.According to Fig. 3 (b), the average times our participants hit snooze every night was about 2 times.As the snooze duration by default was 10 minutes, we assumed that the participants put off their bedtimes for 20 minutes on average every day, which is still acceptable.
Fig. 4 shows the answers to Question 1 -6 in the final survey.As shown in the pie 42% of participants thought their sleep pattern changed while they were using Lights Out.This percentage is lower than the percentage of participants who agreed that they became more capable of managing their sleep-wake in Fig. 3 (a), because some of the participants already had a healthy sleep schedule before participating in our study, and our apps only helped them stick to their original schedule rather than changing it.In Fig. 4 (b), only 16% of the participants thought our animations played a role in their bedtime decision making, likely because participants are unable to customize the animations in our current version, which was also expressed in comments they made in their final surveys.In Fig. 4 (c), 42% of the participants considered filing a daily survey disruptive.This is a problem haunting nearly all sleep studies.To ensure the accuracy of data, researchers usually have to ask participants to look back on their sleep experience every morning.By using an electronic form, we had already tried our best to make the procedure less cumbersome.In the next two questions about the Sleep Wallpaper, 33% of the participants thought about seeing butterflies when setting their bedtime alarm, and 37% of the participants saw at least one butterfly on their wallpapers after two weeks.In consideration of the fact that the wallpaper system did not work on four participants' phones due to compatibility issues, nearly half of the remaining participants got positive feedback for their consistent bedtimes during the second week.According to the results of the last question, 37% of the participants once tried to trick the alarm system.We knew that it is impos- sible to block anyone from tricking the system, but we still took a lot of measures to make it more difficult for people to shut down the system without going to bed (e.g. using the proximity sensor to detect if the phone screen is covered).In this case, the hardship of tricking the system can function as a negative feedback towards procrastination.

CONCLUSION
Our user study showed a significant decrease in the standard deviation of participants' bedtimes when they used our apps, and most participants felt they were more capable of managing their sleep-wake schedule with the help of our apps.All the data suggest that our system indeed changed people's behaviors and helped them go to bed more consistently.

Figure 1 :
Figure 1: Lights Out app sequence with Sleep Wallpaper visible in the background.

Figure 2 :
Figure 2: Measures and hypotheses of our study (*basic expectations).

Figure 3 :
Figure 3: Answers to Question 7 (a) and 8 (b) in the final survey.

Figure 4 :
Figure 4: Answers to Question 1 -6 in the final survey.

Table 1 :
Statistics of the bedtime standard deviations for each week and each data source.

Table 2 :
Average bedtimes of all participants for each week and each data source with p-values.

Table 3 :
Statistics of seven metrics in the daily survey.