Have you guys looked into this at all? I'm no engineer, but I have thought about it in regards to lucid dreaming many times. They already have it set up to determine when someone is in various stages of sleep.

http://www.hoana.com/technology.html

It's my Father's company, so if you have any questions let me know.