I know there is already one application in n900. The application name is "sleeppy". I've used several times, and it is a simple application. The app is checking the sleep patten and writes a log and you can set up alarm.