We used magnetoencephalography to characterize the spatiotemporal dynamics of cortical activity during top-down control of working memory (WM). fMRI studies have previously implicated both the frontoparietal and cingulo-opercular networks in control over WM, but their respective contributions are unclear. In our task, spatial cues indicating the relevant item in a WM array occurred either before the memory array or during the maintenance period, providing a direct comparison between prospective and retrospective control of WM. We found that in both cases a frontoparietal network activated following the cue, but following retrocues this activation was transient and was succeeded by a cingulo-opercular network activation. We also characterized the time course of top-down modulation of alpha activity in visual/parietal cortex. This modulation was transient following retrocues, occurring in parallel with the frontoparietal network activation. We suggest that the frontoparietal network is responsible for top-down modulation of activity in sensory cortex during both preparatory attention and orienting within memory. In contrast, the cingulo-opercular network plays a more downstream role in cognitive control, perhaps associated with output gating of memory.