Spotify on iOS makes it easier to fall asleep to your favorite music

Spotify has finally given iOS users access to a nifty feature that first arrived on Android earlier this year. With the new Sleep Timer function, users can choose how long music will play before automatically turning off. The feature solves a common annoyance involving listening to music at night, one often responsible for disrupted sleep and grumpiness the next day.

The Spotify Sleep Timer is exactly what it sounds like — a setting that counts down for a predetermined time. Once the timer hits zero, the app will stop playing audio. Users can set the timer for durations of up to one hour after they start playing audio using the Android — and, starting today, iPhone — app.

To set a sleep timer, start playing a song or playlist, then tap the playback bar at the bottom of the app to open the full playback screen. Once open, tap the icon located in the bottom right corner of the control bar, which will open a menu that features several different options.

Users should now see a setting within this menu that simply states, "Sleep timer." Tap on the timer and you'll see the duration options shown in the image above. The Spotify app will continue to play the audio for whatever duration you selected.

The idea is that music may be a pleasant way to fall asleep, but it's an annoying way to be awoken in the middle of the night. By setting a timer, you can make sure the music will stop playing by the time you fall asleep, helping guarantee a restful night. The feature started rolling out on iOS today but may take some time to show up for all users.