ObjectiveTo examine the relationship between prenatal maternal stress, resilience, and sleep quality, and to determine whether resilience plays a mediating role in the relationship between prenatal maternal stress and sleep quality among pregnant women. MethodsTwo hundred and thirty-one pregnant women in their second trimester participated in the study. They completed questionnaires, including: the Pittsburgh Sleep Quality Index (PSQI), the Pregnancy Stress Rating Scale (PSRS), and the 10-item Connor-Davidson Resilience Scale (CD-RISC-10). A structural equation model was used to analyze the relationships among prenatal maternal stress, resilience, and sleep quality, with resilience as a mediator. ResultsPrenatal maternal stress was negatively associated with sleep quality in pregnant women (p < 0.01), whereas resilience was positively associated with sleep quality (p < 0.01). Furthermore, resilience mediated the relationship between prenatal maternal stress and sleep quality, and the mediation effect ratio was 22.0% (p < 0.01). ConclusionsThe risk factor for disturbed sleep was pregnancy-specific stress; however, the protective factor for sleep quality was resilience. This finding could provide scientific evidence for the development of intervention strategies with which to improve sleep quality in pregnant women.