Sleep intensity is adjusted by the length of previous awake time, and under tight homeostatic control by protein phosphorylation. Here, we establish microglia as a new cellular component of the sleep homeostasis circuit. Using quantitative phosphoproteomics of the mouse frontal cortex, we demonstrate that microgliaspecific deletion of TNFa perturbs thousands of phosphorylation sites during the sleep period. Substrates of microglial TNFa comprise sleep-related kinases such as MAPKs and MARKs, and numerous synaptic proteins, including a subset whose phosphorylation status encodes sleep need and determines sleep duration. As a result, microglial TNFa loss attenuates the build-up of sleep need, as measured by electroencephalogram slow-wave activity and prevents immediate compensation for loss of sleep. Our data suggest that microglia control sleep homeostasis by releasing TNFa which acts on neuronal circuitry through dynamic control of phosphorylation.