I thought I'd measure my body function during sleep. So I got a recording Oximeter (similar to this one) to record dissolved oxygen in my blood and pulse rate plus a respiration sensor from Vernier (this one).
I found out that when your pulse rate quickly fluctuates during the night, you're most likely in REM sleep. So looking at the red line, I see what I think are three or four instances of REM sleep.
Oxygen levels appear to remain high but seem to fluctuate the most during REM sleep. However, the amount of fluctuation is not as great as that seen in pulse rate.
The respiration belt saves data to an app on my cellphone via Bluetooth, but the cellphone can't run the app all night without locking up. I will test running the app on a laptop next time to see if I can record data all night. However, from the nearly four hours of data that I can record, I can see a correlation between respiration rate and heart rate. I imagine that your heart needs more oxygen when you dream.
I think I'll try adding a temperature logger next. However, I'll need to find a way to attach it without my rolling over effecting the reading. So perhaps to the top of my head?