Prenatal and postpartum depression are highly prevalent worldwide, and emerging evidence suggests they contribute to impairments in children's executive functions. Studies of maternal depression, however, have focused on the postpartum and postnatal periods with relatively less consideration of prenatal influences on child development. This study of the large population-based Avon Longitudinal Study of Parents and Children U.K. cohort estimates latent classes of maternal depression across the prenatal, postpartum, and postnatal periods to capture heterogeneity in the developmental timing and length of maternal depression, as well as to test whether latent classes differ in children's executive function impairments in middle childhood. Repeated measures latent class analysis yielded five groups demonstrating unique patterns of change in maternal depression from pregnancy through early childhood (n = 13,624). Latent classes differed in executive functions at age 8 among a subsample of children (n = 6,870). Children exposed to chronic maternal depression beginning in utero showed the most impairments in inhibitory control while accounting for child sex, verbal IQ, parents' highest education level, and average family income in childhood. The critical roles of the timing and length of children's exposure to maternal depression are discussed in relation to executive function development, prevention, and intervention. (PsycInfo Database Record (c) 2023 APA, all rights reserved).