Interesting thought. Pretty useless for people like me - it takes me 2-4 hours to fall asleep usually. It would be helpful if you could include an option for setting how long it usually takes one to fall asleep, and adjust the calculations accordingly.
Also for those interested, I've found the wakemate to be pretty useful and pretty accurate, especially for someone like me who has an enormous period of time I might fall asleep in. It works as an actigraph to capture your sleep patterns and determine the ideal point to wake you, in a given time range you specify. Of course, the solution presented here is a bit cheaper =)
Wow, it's always taken me about an hour (sometimes two) to, but 4 is pretty rough. Care to share why this is, and how you combat it? I do the regular stuff, but have also come to embrace it since I often have pretty productive thoughts.