Spatial navigation and memory formation are intrinsically linked. In the hippocampus, neuronal patterns that map an animal's trajectories during wakefulness are replayed during non-REM sleep, a process crucial for memory consolidation. Upstream of the hippocampus, the head-direction (HD) circuit provides a key input signal for navigation, yet its contribution to navigation and memory during sleep remains unclear. Here, I will present evidence that the HD system maintains its internal coherence and an environment-specific orientation memory over weeks. HD cells remain coordinated during sleep and directly shape hippocampal dynamics around two population events critical for memory formation: sharp-wave ripples and dentate spikes. Before sharp-wave ripples, HD cells coherently increase their gain; before dentate spikes, they fire in brief, synchronous bursts. These bursts occur during both wakefulness and sleep and are reliably triggered by sound, possibly reflecting motor efferent copies of an orienting response, whether or not it is overtly executed. The HD system thus conveys not only a coherent orientation signal across wake and sleep, but may also act as an attentional gate that flags salient events for hippocampal encoding. In summary, the HD system provides the hippocampus and associated structures with a coherent, and possibly lifelong-stable, signal maintained across brain states to support spatial navigation and memory formation.