Patent attributes
In some implementations, a mobile device can adjust an alarm setting based on the sleep onset latency duration detected for a user of the mobile device. For example, sleep onset latency can be the amount of time it takes for the user to fall asleep after the user attempts to go to sleep (e.g., goes to bed). The mobile device can determine when the user intends or attempts to go to sleep based on detected sleep ritual activities. Sleep ritual activities can include those activities a user performs in preparation for sleep. The mobile device can determine when the user is asleep based on detected sleep signals (e.g., biometric data, sounds, etc.). In some implementations, the mobile device can determine recurring patterns of long or short sleep onset latency and present suggestions that might help the user sleep better or feel more rested.