I am not sure if this is a new feature or not. But this is the first time I have noticed it.
If you look in the clock app of the iphone in the timer feature, if you select the option to set the ring tone now there is a option to put to "sleep ipod".
Which means you stop the music after a certain time. This is a cool feature I was searching for in other app's. Once you set timer the music is stopped without any warnings or beeps.
Now I can put the iphone on 15 min timer and sleep. After 15 min the iphone timer will stop the music and I can dream on.
I didn't see this feature mentioned any where else that is the reason for writing this post.