If you want to go to sleep while your iPhone is playing music but you don’t do it because you think the music will play forever, here is a solution for you.
Step # 1 – Launch your Clock app with a tap,

Step # 2 – Then tap on the Timer button in the lower right.

Step # 3 – Once there, set the timer for however long you want your media to play.

Step # 4 – Next, tap “When Timer Ends,” and scroll all the way to the bottom.

Step # 5 – Tap on Stop Playing.
