I have tried repeatedly to write an algorithm for detecting REM sleep from the heartbeat:
http://www.dreamviews.com/research/1...rem-sleep.html.

I thought there was a little more to it than an increase in BPM... according to this there should be an "increase in the chaotisity (decrease in D2 degree of freedom)":
http://epileptologie-bonn.de/cms/upl.../fell/Ecg2.pdf

Any way that you could provide sleep logs?