Tests may be needed if your medical exam shows something abnormal. People with RBD are at risk for other sleep disorders. As a result, your doctor will likely have you take an overnight sleep study. This is called a polysomnogram. It charts your brain waves, heartbeat, and breathing as you sleep. It also records how your arms and legs move. This shows if there are other disorders that are related to your sleep problems. Examples of these disorders include sleep apnea and periodic limb movement disorder. The best sleep study will also record your sleep on video. This will show if you get out of the bed and do anything unusual during the night.