If you like to fall asleep to music but don't like leaving your equipment on all night long, then you'll be happy to know that your iOS device has a way to stop playing music at a time you specify. The setting for this is within your Clock app, so let's start there.
Once you arrive, click on the Timer tab at the bottom. You'll set the amount of time you want to elapse before your music stops, and on the iPhone, you'll then tap "When Timer Ends" and change it to "Stop Playing" (it's all the way at the bottom of the list).
On the iPad, you'll touch the Sounds button instead to select the same thing.
Afterward, just tap Start, and you'll be lulled to sleep by the sweet, sweet sounds of Megadeath or whatever.
It doesn't matter whether your music is already playing before you set this up, either—you can switch your tunes on either before or after these steps.
The cool thing about this feature is that it'll work in all sorts of apps that output sound (not just the built-in Music app). So you could listen to Pandora as you fall asleep, for example, or a radio app, or whatever. Neato! Well, it's neato for those of you who don't need crypt-like silence while you sleep, anyhow.