Maternal stress and depression during pregnancy and the first year of the infant's life affect a large percentage of mothers. Maternal stress and depression have been associated with adverse fetal and childhood outcomes as well as differential child DNA methylation (DNAm). However, the biological mechanisms connecting maternal stress and depression to poor health outcomes in children are still largely unknown. Here we aim to determine whether prenatal stress and depression are associated with changes in cord blood mononuclear cell DNAm (CBMC-DNAm) in newborns (n = 119) and whether postnatal stress and depression are associated with changes in peripheral blood mononuclear cell DNAm (PBMC-DNAm) in children of 12 months of age (n = 113) from the Canadian Healthy Infant Longitudinal Development (CHILD) cohort. Stress was measured using the 10-item Perceived Stress Scale (PSS) and depression was measured using the Center for Epidemiologic Studies Depression Questionnaire (CESD). Both stress and depression were measured at 18 weeks and 36 weeks of pregnancy and six months and 12 months postpartum. We conducted epigenome-wide association studies (EWAS) using robust linear regression followed by a sensitivity analysis in which we bias-adjusted for inflation and unmeasured confounding using the bacon and cate methods. To investigate the cumulative effect of maternal stress and depression, we created composite prenatal and postnatal adversity scores. We identified a significant association between prenatal stress and differential CBMC-DNAm at 8 CpG sites and between prenatal depression and differential CBMC-DNAm at 2 CpG sites. Additionally, we identified a significant association between postnatal stress and differential PBMC-DNAm at 8 CpG sites and between postnatal depression and differential PBMC-DNAm at 11 CpG sites. Using our composite scores, we further identified 2 CpG sites significantly associated with prenatal adversity and 7 CpG sites significantly associated with postnatal adversity. Several of the associated genes, including PLAGL1, HYMAI, BRD2, and ERC2 have been implicated in adverse fetal outcomes and neuropsychiatric disorders. This suggested that differential DNAm may play a role in the relationship between maternal mental health and child health.