You may be unaware that Apple has hidden a music sleep timer in the native Clock app on your iPhone. If you like to listen to soft rock classics from the 80s, a smooth jazz iTunes Radio station, or your slow jam playlist inspired by your Ex before bed, then this feature is for you. 

Launch the Clock app from your iPhone home screen. Tap the Timer icon in the section bar at the bottom of the Clock app. Select a duration of time to play music.  Tap the "When Timer Ends" menu and  choose "Stop Playing" option at the bottom of the list of Ringtones.  Tap "Set" in upper right to confirm and complete the process.

This feature works flawlessly with the native Music app, however, not all third party apps, like Spotify and Pandora, play harmoniously with this feature... so to speak.