SummaryBrain resident macrophages such as microglia and CNS-associated macrophages (CAMs) are already established before birth and play therefore a crucial role for normal brain functioning during development. However, their involvement in fine-tuning complex physiological functions such as vigilance states (VS) after birth remains poorly understood. Here, we investigated the reciprocal interaction of microglia and VS using multimodal high throughput transcriptional, electrophysiological and metabolomic profiling in mice. We found that sleep deprivation caused severe transcriptional changes in microglia and CAMs and absence of the wake-promoting neuropeptides hypocretin/orexin intensified these effects. Depletion of embryonic microglia robustly increased sleep quantity during the active period, while decreased sleep quality that was reflected in reduced power of brain sleep oscillations. Unexpectedly, subsequent repopulation by postnatal microglia failed to reestablish normal sleep-wake patterns, and even induced additional abnormalities such as sleep fragmentation. Moreover, we found a substantial excitatory-inhibitory synaptic imbalance following microglia depletion, which was not normalized after microglial repopulation and even lead to an increase of inhibitory synapses in the brain. At the metabolite level, we observed a distinct metabolite pattern after microglia depletion, which largely returned to normal levels after repopulation. Our findings suggest a so far largely unknown interaction between microglia and brain VS and emphasizes striking functional differences between embryonic and postnatal-derived microglia, thereby potentially paving the way for the further exploration of microglia of different origin and their roles in sleep disorders and synaptic connectivity.