Replay has been implicated in organising experiences into cognitive maps offline, yet how this process evolves through development remains unclear. We studied 106 participants (ages 8-25) who learned a hidden two-dimensional (2D) structure and then underwent magnetoencephalography (MEG) during a map-based inference task and subsequent rest, allowing us to detect spontaneous replay. Younger participants relied more on replay alone to represent the 2D associations, whereas older participants showed increasingly precise alignment between replay and the default mode network (DMN), particularly when replay events were timed to the DMN theta (2-6 Hz) trough. This alignment further predicted grid-cell-like codes in the entorhinal cortex, previously identified in the same cohort using fMRI. Resting-state fMRI indicated that DMN connectivity also strengthened with age, which explained reduced reliance on replay and faster inference across development. These findings illuminate a developmental progression where replay shifts from an isolated hippocampal process to a coordinated hippocampal-DMN mechanism. This shift may underpin maturing grid-like schema representations, offering insight into how children gradually build internal knowledge structures for flexible inference.