![](https://www.iphonelife.com/sites/iphonelife.com/files/styles/promo_in_content_save-bottom_2x/public/alarm_3.jpg?itok=TgcDEZUB)
* This article is from our Tip of the Day newsletter. Sign Up. *
I like listening to shows or music before I fall asleep. Unfortunately, I had a habit of falling asleep while the media was playing and would wake up to a dead device. Here's an easy tip to use the Clock's hidden sleep timer on your iPhone so that media will automatically stop playing.
![iPhone Life](https://www.iphonelife.com/dailytips/img/inline_offer_bg.jpg)
Why You'll Love This Tip:
- Use a sleep timer in apps that don't have one built-in.
- Automatically stop music or podcasts if you fall asleep.
How to Set a Sleep Timer on iPhone
System Requirements
This tip should work on every version of iOS, but the screenshots for this article were taken on iOS 17. Find out how to update to the latest version of iOS.
While apps like the Podcasts app have a sleep timer built-in, some apps don't have this functionality. This tip works with Apple Music, YouTube, and more. For more hidden iPhone tricks, be sure to sign up for our free Tip of the Day newsletter. Now, here's how to set a sleep timer on iPhone:
- Open the Clock app.
- Tap the Timers tab, if it is not already selected.
- Tap When Timer Ends.
- Scroll down and select Stop Playing.
- Tap Set.
- Set the timer for the length of time you want, and tap Start.
Open whichever media you want, and it will automatically close when the Timer ends. Now, you have a sleep timer for Apple Music or whatever app you use to wind down before bed. Enjoy a better sleep without worrying about your device's battery life.