These devices tap into your brain function and your senses to regulate your REM cycle.