BackgroundEnsuring patient safety is of paramount importance in healthcare services. Sleep disorders not only have detrimental effects on the health of healthcare students but also significantly impair their performance, leading to an increased risk of medication errors. These errors can pose a grave threat to the safety and well-being of patients. It is crucial to address and mitigate sleep disorders among internship healthcare students to safeguard the quality of care and minimize potential patient harm.ObjectivesThis study aimed to investigate the predictors of Patient Safety Competency (PSC) based on the sleep quality of internship healthcare students.MethodsA study was conducted on 331 students from the Ardabil School of Nursing and Midwifery at Ardabil University of Medical Sciences in northwest Iran from August to December 2022. The participants were selected by stratified random sampling. Data were collected using a demographic information form, the Pittsburgh Sleep Quality Index (PSQI), and the Health Professional Education in Patient Safety Survey (H-PEPSS). The collected data were analyzed using SPSS software version 22.0. Person correlation coefficients were used to examine the relationship between PSC level, its dimensions, and sleep quality, while multiple linear regression was conducted to identify the predictors of PSC.ResultsThe competency of nurses in patient safety was average in both classroom and clinical settings. However, their ability to work as a team with other healthcare professionals scored the lowest. In addition, the quality of sleep was found to be a predictor of patient safety competency among healthcare students during their internships.ConclusionsIt is important to note that healthcare students tend to have moderate patient safety competence (PSC), which is positively correlated with their sleep quality. Therefore, it is vital to identify the key factors that directly affect PSC. This would enable nursing and midwifery faculty administrators to take preventive measures to enhance patient safety competence in both classroom and clinical settings. Additionally, organizing educational workshops that engage students and improve their sleep quality could improve patient care. Practical courses are recommended for health professionals and students in clinical settings to enhance patient safety competencies. Additionally, student internships should receive hands-on training to improve teamwork and rest conditions.