There are a lot of great recommendations here, but I'd like to add the Sleep Cycle app I recently purchased for my iPod Touch/iPhone. I've been having restless sleep lately and, after reading through the Sleep Cycle reviews and trying it out on my own, I'd recommend it. Only after five days of using it, I believe I'm getting a better night of rest. There's nothing magical about it, more or less a reality check on how many hours of "Deep Sleep" I've been getting, and realizing that I can't go on 4 hours of sleep and function well the following day. It's opened my eyes to exactly how much "rest" I get every night. I also like that it customizes to your sleeping pattern to gently wake you up during the best time. um, yeah.... I don't think I understand it all, but it seems to be working for me. :] It's only 99¢ in itunes, can't go wrong with that price.
What a great app for your iPhone!!! This apps creates a graph of your nightly sleep and wakes you when you are at the lightest sleep to avoid waking groggy with a nice gentle tone. I love looking back at previous days graphs to see how I slept. It will also keep track of your average number of hours per night of sleep.