Searching the App Store for a sleep timer yields a half dozen or so competing results, but did you know iPhone has basic sleep timer functionality out of the box?

I’m not sure how long this feature has been around, but tucked away in the Clock app that ships with the phone is a Timer feature. When the timer finishes, the default action is to play a ringtone, but by tapping the “When Timer Ends” button, you can change this behavior to “Sleep iPod.”

Instructions

  1. Play a song/playlist/audiobook/podcast/etc. using the iPod app as you normally would

  2. Hide the iPod app by pressing the Home button

  3. Start the Clock app and tap the Timer icon on the toolbar

  4. Set the timer duration

  5. Tap the "When Timer Ends" button and select "Sleep iPod"

  6. Tap the "Set" button to confirm your selection

  7. Tap the green start button and drift off to sleep

Both the Clock and iPod apps are examples of iPhone apps that continue to run in the background. This means that if you want to fall asleep listening to a video, you should be able to set and start the timer before playing media with the iPod app and still trust that the timer will function properly.