To assess if the impacts of prenatal maternal stress (PNMS) on neonatal physical development including birth weight and body length vary by trimesters, and to explore the mediating effect of sleep quality in the relationships. A total of 2778 pregnant women were included from the Shanghai Maternal-Child Pairs Cohort. PNMS and sleep quality were measured in the first trimester (12-16 gestational weeks) and third trimester (32-36 gestational weeks) using the Life Event Scale for Pregnant Women (LESPW) and Pittsburgh Sleep Quality Index, respectively. And total LESPW scores were classified into three groups: high stress (≥75th percentile), medium stress (≥25th and <75th percentile), and low stress (<25th percentile). Multiple linear and logistic regressions were employed to examine the associations between PNMS and birth weight, and bootstrap were utilized to explore the mediating effects of maternal sleep. Higher (adjusted odds ratio, aOR=1.521; 95% confidence interval (CI), 1.104-2.096) and medium (aOR=1.421; 95% CI, 1.071-1.885) PNMS and stress from subjective events (aOR=1.334; 95% CI, 1.076-1.654) in the first trimester were significantly associated with elevated risk for large for gestational age. Maternal severe negative objective events stress (OE3) in the third trimester were negatively associated with birth weight (β=-0.667; 95% CI, -1.047∼-0.287), and maternal sleep latency during this period acted as a mediator in the association (indirect effect: β=-0.0144; 95% CI, -0.0427∼-0.0003). Besides, a significant negative correlation between total LESPW score (β=-0.022; 95% CI, -0.038∼-0.006; per 100 score) and body length in the third trimester was also observed. The impact of PNMS on neonatal birth weight varies by stress types and exposure timing. Prolonged maternal sleep latency in the third trimester correlated with lower birth weight, and mediating the link of OE3 and birth weight, which might indicate a critical period of vulnerability to the effects of PNMS on neonatal physical development.