Sleep is an essential need for patients admitted to coronary care units. The present clinical trial aimed to determine the effect of using eye masks and earplugs on the sleep quality of patients with coronary heart disease (CHD). A total of 68 eligible patients with CHD were randomly allocated into four groups of 17 (control, eye masks, earplugs, and eye masks with earplugs). All three interventions were performed during the night from 10:00 p.m. to 7:00 a.m. the next day. The outcomes were the quality of sleep, measured by the Verran and Snyder-Halpern (VSH) Sleep Scale, and the urinary levels of nocturnal melatonin and cortisol, measured by urine samples taken during the night (from 10:00 p.m. to 7:00 a.m.). The study outcomes were measured on the third and fourth days. Sleep disturbance was statistically significantly lower in patients with earplugs (visual analogue scale mean difference [MD]: 74.31 mm, SE:11.34, p = 0.001). Sleep effectiveness was statistically significantly higher in patients with eye mask (MD: 36.88 mm, SE: 8.75, p = 0.001). The need for sleep supplementation was statistically significantly lower in patients with eye masks (MD: 39.79 mm, SE: 7.23, p = 0.001). There was a significant difference in melatonin levels between eye masks and the control group (p = 0.03). For urinary cortisol levels, there were significant differences between eye masks and the control group (p = 0.007), earplugs and the control group (p = 0.001), and eye masks with earplugs and the control group (p = 0.006). The mean scores for comfort, effectiveness, and ease of use were highest for the group that used eye masks (2.88, 2.94, and 3.18, respectively). As a result, all three interventions improved the sleep quality of patients. However, the interventions had different effects on the three dimensions of the VSH Sleep Scale, as well as the urinary levels of cortisol and melatonin.