How to set sleep timer to stop music or video playback on iPhone

Learn how to automatically stop playing music, video, or other media on your iPhone or iPad when a timer runs out, like before you usually fall asleep.

iPhone screen showing a song playing with play and pause icons in the background

White noise and calming music help me fall asleep, but I don’t want the audio playing for longer than 20-30 minutes.

Setting a sleep timer to automatically stop playing media before you fall asleep is super handy, so let’s show you how to do that.

Set a sleep timer for music, videos, and movies

You can set a sleep timer to automatically stop playing media at a designated time in Apple’s Clock app by following the instructions below.

  1. Open the Clock app on your iPhone or iPad and go to the Timers tab.
  2. Tap Sound (formerly When Timer Ends). This is where you’d normally select the timer sound.
  3. Scroll to the bottom and select Stop Playing. Then tap Set in the top-right corner.
  4. Set your timer in hours, minutes, and seconds, and tap the Start icon to run it.
Setting timer to stop playing media on iPhone

If you’re listening to music or watching a movie, playback will stop automatically when the timer is up.

To create a timer with a ringtone instead, be sure to turn off the “Stop Playing” action and choose a timer sound; I can’t tell you how many times I’ve set a cooking timer that never rang because I left it on Stop Playing.

Sleep-based audio control with AirPods

AirPods settings on iPhone with the option to automatically pause media playback when falling asleep turned on.
AirPods can stop the music if you’re sleeping. Image: Christian Zibreg/iDB/Apple

If you wear your AirPods 4 or AirPods Pro 2 or later in bed, they can automatically pause audio when you fall asleep. Sleep-based audio control on AirPods is a new capability that works independently of the timer function in the Clock app.

Also, check out: