The study was conducted in a descriptive and cross-sectional manner to determine the factors that influence the sleep quality in oncology patients between December 31, 2016 and December 31, 2017. The participation of 238 patients that were hospitalized in a public hospital in Turkey. The case group consisted of 119 in patients who were diagnosed with cancer and hospitalized in the surgery department. The control group consisted of 119 inpatients who were diagnosed with any acute or chronic condition other than cancer and hospitalized in other clinics. The control group was chosen to match the case group in sociodemographic properties. The properties of the patients were determined using a 29-question survey and the Pittsburgh Sleep Quality Index. Percentage analysis, Kruskal-Wallis test, and Mann-Whitney U test were used for evaluating the data. In the case group patients, 33.6% were diagnosed with stomach cancer, 54.6% were in Stage II of cancer, 98.3% underwent surgical treatment and 28% underwent chemotherapy, 89.7% had treatment-related pain, 52.9% had a chronic disease together with cancer, 63% had their sleep quality partially influenced by environmental factors. The median Pittsburgh Sleep Quality Index score was 5 for the study group and 4 for the control group. It was observed that some of sociodemographic and clinical properties influenced the Pittsburgh Sleep Quality Index scores. This study has found that both the case and control groups had good sleep quality. It is recommended that nursing interventions should be planned in order to improve the sleep quality of the patients.