Excessive noise levels may decrease patients' sleep quality and increase the risk of sleep disorders in patients. Given that only a few studies have been conducted on noise levels and sleep quality in hospitalized patients, this study investigated the effects of different noise environments on polysomnographic parameters and sleep in hospitalized patients. It also analyzed the factors associated with patients' sleep quality. A sample of 244 cases of hospitalized patients were retrospectively selected from March 2020 to March 2023. A total of 122 patients without ward noise reduction treatment were set as the control group. A total of 122 patients who were treated with ward noise reduction were set as the observation group. The polysomnographic monitoring parameters and sleep conditions levels were compared between the two groups, after which logistic regression was used to analyze the relevant factors that affected patients' sleep. The incidence of noise level, rapid eye movement stage (R) phase proportion, nonrapid eye movement stage 1 (N1) phase proportion, and poorer sleep quality all had higher levels in the control group than in the observation group. In comparison, nonrapid eye movement stage 2 (N2) phase proportion, total sleep time (TST), and sleep efficiency (SE) were all lower than those in the observation group (P < 0.05). Regression analysis revealed that the need for surgery, having diabetes mellitus, higher noise level and low N2 percentage levels were all associated factors affecting the sleep quality of patients. Environments with higher levels of noise can lead to patients' poorer sleep quality. Thus, it is necessary to actively implement noise management measures to avoid higher noise levels and maintain good sleep quality among patients.