### Related Work
Because this type of study gathers data on what happens in a person's body while they sleep, there are different types of studies depending on the diagnosis to be validated. An interesting exercise is the study of polysomnography [18]. During a polysomnography study, equipment is used. (a) An Electroencephalogram is placed using electrodes on the user's head, which measures the stages of REM and nonREM sleep from the patient's brain activity throughout the night. (b) Motion sensors are placed between the eyes and ears to detect muscular movements in the area. This sensor is mainly helpful in detecting the movement of the eyes when reaching REM. (c) An oximeter is placed on the patient's index finger, measuring blood oxygen saturation and pulse. (d) A pressure sensor located in a nasal cannula is responsible for measuring the rate of respiration and, at the same time, calculating pulmonary saturation. (e) A microphone that detects and records snoring during the night. (f) A camera that a technician supervises to record the user's movements during the night. During the study, a specialist technician stays alert if a sensor becomes detached from the patient and has to intervene to return it to its place. Once the study is finished, the patient returns to his/her everyday life to wait for his/her results while the technician collects the data to send them to the patient's specialist doctor. _(B)_ Technologies for sleep monitoring  
Hundreds of companies worldwide have become aware of the public health problem that lack of sleep means and how it affects the productivity of corporations. A new generation of apps and devices may be the way to improve sleep [19]. Manufacters are developing gadgets like mobile phone alarms that wake people up at the most opportune time in their sleep cycles and wristbands that monitor heart rate. The work cited in [20] consists of a sensor that starts working when a person goes to bed and analyzes data related to sleep, such as the time it takes someone asleep before waking up, heart rate, temperature, movement, and snoring. Another exciting initiative of sleep study through technology is polysomnography. This comprehensive recording of the bio-physiological changesduring sleep is considered the standard for [21] sleep studies. Dr. [PERSON] studied the Fitbit, a wristband that tracks sleep and exercise by measuring movement. He determined that it overestimated sleep time and quality by mismeasuring wakefulness as [22] sleep. These devices can encourage behavioral changes in healthy people who want better sleep by giving people a more accurate idea of how long [23] is sleeping. The work cited in [24] proposes a model for detecting generalized anxiety through monitoring heart rate, hours of sleep, and physical activity with commercial wearable devices. The data collected from these devices is recorded in a processed and analyzed database. The decision tree classification algorithm generates the behavioral model corresponding to generalized anxiety disorder. The relevant attributes and the behavior model that determines the level of anxiety corresponding to a generalized anxiety disorder are obtained. Furthermore, it has been proved that determining people's heart rate is a good indicator to track sleep quality. The work cited in [25] analyzes heart-rates based on an algorithm that tracks these signs in individual sleep in free conditions. Their algorithm proved that their method could work on free-conditions or laboratory conditions which helps to keep interpreting the importance of sleep. Another implication people faces when sleeping is sleep apnea which is a consequence of bad breathing during night as [26] states in their research. They designed and implemented a controller for controlling sleep devices that track breathing during sleep. Since detecting breathing disorders during sleep is crucial to get a good quality sleep, it is important to control the pressure of these devices to get a good functionality.