Recently, I bought a very good apps from apps store. I can't stand to share with you.
This is "Sleep Cycle" .....
First of all, it is still on sale. It only costs you US$0.99 !
Secondly, it use the iPhone's accelerometer to monitor your sleeping movement to determine which sleep phase you are in.
And "Sleep Cycle" will wake you up in your lightest sleep phase.
For details, please go to developers web site.
This is one of my sleeping graph :P .