The objective of this study was to quantify associations of infant 24-hour sleep duration and nighttime sleep consolidation with later child cognition. This study included children from Project Viva, a prospective cohort in Massachusetts with (1) sleep measures in infancy (median age 6.4 months) and (2) child cognition in early childhood (median age 3.2 years) or mid-childhood (median age 7.7 years). Main exposures were parental reports of infant 24-hour sleep duration and nighttime sleep consolidation (% of total daily sleep occurring at nighttime). Cognitive outcomes were (1) early childhood vocabulary and visual-motor abilities and (2) mid-childhood verbal and nonverbal intelligence quotient (IQ), memory, and visual-motor abilities. We examined associations of infant sleep with childhood cognition using linear regression models adjusted for child sex, age, and race or ethnicity; maternal age, education, and parity; and household income. Early and mid-childhood analyses included 1102 and 969 children, respectively. Most mothers reported infant race or ethnicity as White (69%) and were college graduates (71%). The mean infant 24-hour sleep duration was 12.2 ± 2.0 hours, and the mean nighttime sleep consolidation was 76.8% ± 8.8%. Infant 24-hour sleep duration was not associated with any early or mid-childhood outcomes. Higher infant nighttime sleep consolidation was associated with higher mid-childhood verbal intelligence (β: 0.12 points per % nighttime sleep; 95% CI, 0.01-0.22), but not with any early childhood cognitive measures. In this cohort, higher infant nighttime sleep consolidation was associated with higher verbal IQ in mid-childhood. Future studies should investigate causal relationships of infant sleep consolidation with child cognition among diverse populations.