Tap Timer, then flick to set the number of hours and minutes. Tap Start to start the timer.
Tap When Timer Ends.
Set the timer, then tap When Timer Ends and choose Sleep iPod.
When you set a sleep timer, iPhone stops playing music or video when the timer ends.
If you start the timer and then switch to another iPhone application, the timer continues running.