Anyone who’s ever been to a hospital knows how busy they can be during the daytime hours. At night, some areas become a little quieter, but in the intensive care unit (ICU), multiple monitors continue beeping, doctors and nurses are constantly observing patients, and people are always talking. Such an environment can make it hard for patients to sleep and even slow down their recovery. Now, a new study finds melatonin supplements may help these patients sleep through the night, with implications beyond the hospital bed.

Until now, patients having difficulty sleeping during their stay in ICUs have been given eye masks and ear plugs. But these inexpensive solutions can be uncomfortable. The research team, from Capital Medical University in Beijing, China, found melatonin could offer a better solution. Melatonin, a hormone naturally produced in the pineal gland, is responsible for regulating sleep-wake cycles, and helps us sleep.

For their study, the researchers had 40 healthy volunteers spend a few nights in a lab, where an ICU environment was replicated, from the noises (played from a recording) to the lighting. For the first four nights, all participants were exposed to the sounds and lights on alternating nights. Then, they were divided into four groups: one received no sleep aid; another got the ear plugs and eye mask; the third group got 1 milligram of fast-release oral melatonin; and the last group got a placebo.

Blood samples were taken each hour to measure participants’ melatonin levels. And their quality of sleep was assessed through brain scans while other instruments tracked eye movement and muscle tension. At the end of every night’s rest, participants were also asked to report their sleep quality and anxiety levels.

The researchers found that all participants found difficulty sleeping with the simulated ICU environment, impacting their anxiety levels. Participants given either of the sleep aids reported better sleep, however, it was those who took melatonin that woke up less often over the course of the night. In turn, this allowed them to enter REM sleep (rapid eye movement) more often, which is when the brain is believed to consolidate memories and energize the body.

“Both use of oral melatonin and use of earplugs and eye masks improve sleep quality at different levels, especially melatonin,” said Professor Xiu-Ming Xi, from the university’s Fuxing Hospital, in a press release. Melatonin may be the overall winner not only in terms of better performance but also in its ease of use, he suggested. However, he also said further study, with a larger group of people, is necessary.

The findings have implications beyond the hospital bed because the participants were healthy adults. People who live in cities, such as New York, where upstairs neighbors can be loud, as well as those who have a hard time sleeping from jet lag or insomnia may also benefit. According to the National Institutes of Health, melatonin is “likely safe” for most adults when taken by mouth over the short-term, and “possibly safe” when taken over the long-term. Because long-term use may cause some side effects, it’s best to check with a doctor before using the supplement.

Source: Huang HW, Zheng BL, Jiang L, et al. Effect of oral melatonin and wearing earplugs and eye masks on nocturnal sleep in healthy subjects in a simulated intensive care unit environment: which might be a more promising strategy for ICU sleep deprivation? Critical Care. 2015.