If you want to listen to music for a short amount of time as you fall asleep, you can set up the timer to shut down your iPhone or iPad.
If you use your iPhone or iPod touch to play music or watch a video to fall asleep – make it turn off automatically. Here’s how to put your media on a timer and shut down after a certain amount of time.
Make iPhone Stop Playing When You Sleep
First, tap the Clock icon and select the Timer feature. Tap on the When Timer Ends button.
Next, scroll to the bottom and select Sleep iPod. Then tap the Set button.
Set the timer for how long you want the media to play and tap Start.
The Timer will start counting down.
Click the Home button to close out of the timer. Now start playing your music, video, podcast, or online radio and drift off.
After the timer reaches zero, your device will go to sleep. Cool!