## 5 Discussion
These data can be used to provide personalized alarm feedback and recommendations to the user to improve their sleep. For example, if the system detects that the user has a high sleep latency or wake after sleep onset, it can provide recommendations to the user to improve their sleep hygiene, such as avoiding caffeine or electronic devices before bedtime. Additionally, the system can also provide recommendations for the user to improve their sleep environment. For example, if the system detects that the user's room temperature is too high or too low, it can provide recommendations to adjust the temperature to optimize sleep. It can also detect noise, light and humidity level, as well as other environmental factors that can affect sleep quality, providing feedback to the user to minimize or eliminate these factors. Furthermore, it can also detect the use of sleeping aids or any other drug use, and make recommendations if needed. Overall, the remote sensor network monitoring system provides users with valuable insights into their sleep patterns and ways to improve their sleeping habits, which can lead to better overall sleep health and quality of life. This study is based on an original proposal for a sensor system that adapts to the person's habits using a low energy-consumption algorithm. The sensor system sends recommendations to users daily. These recommendations are tailored to a person's ideal sleeping conditions. Recommendations are based on the person's use when moving through different areas of their house. The sleep improvement information is verified daily through a smartwatch to identify whether the system is having a positive, negative or neutral impact on the habits of falling asleep. However, if the person truly has a sleep disorder or is regularly interrupted, using this sensor system will not be a reliable indicator of sleep health. Of course, the best option will be a sleep study that a physician can order to obtain a reliable and accurate reading. With the results of the paired hypothesis test analysis, the correlation analysis, and the cluster analysis that includes a sub-groping and a regression analysis over the sleep studied metrics we can discuss the following findings. In sleep, the body enters a relaxed state, and the health metrics change. For example, during the sleep period the heart rate, breathing frequency, and temperature tend to decrease [51; 52]. Also, for an adult, the recommended total sleep time ranges from 7 to 8 h [53] with approximately 20% of deep sleep and 25% REM sleep for quality rest. In the paired hypothesis test analysis, it was possible to see that with the use of the sensor network, the nine metrics were statistically different, total sleep time, deep sleep, REMS sleep, heart rate variability, and oxygen saturation increased, while, heart rate, breathing frequency, temperature, and snoring decreased. These results suggest that the nine metrics improved in a general way with the use of the sensor network. Although the correlations found in the correlation analysis are not strong, some of them show some tendencies. Once knowing that the total sleep time increased and the snoring decreased, the negative correlation between the total sleep time and snoring with the use of the sensor network can mean that elderly people slept more and with less interruptions with the use of the sensor network. Temperature and REM sleep change the direction of the correlation with the use of the sensor network, they pass from a positive correlation to a negative correlation. Once knowing that the temperature decreased and the REM sleep increased the negative correlation can mean that the REM sleep increases when the temperature decreases. According to [52], body temperature decreases in the REM sleep states, nevertheless, REM sleep occurs over a much longer duration than deep sleep,which can be why REM sleep has a correlation with temperature in this study and deep sleep does not.