Abstract Brain computation performed by billions of nerve cells relies on a sufficient and uninterrupted nutrient and oxygen supply 1,2 . Astrocytes, the ubiquitous glial neighbours of neurons, govern brain glucose uptake and metabolism 3,4 , but the exact mechanisms of metabolic coupling between neurons and astrocytes that ensure on-demand support of neuronal energy needs are not fully understood 5,6 . Here we show, using experimental in vitro and in vivo animal models, that neuronal activity-dependent metabolic activation of astrocytes is mediated by neuromodulator adenosine acting on astrocytic A2B receptors. Stimulation of A2B receptors recruits the canonical cyclic adenosine 3′,5′-monophosphate–protein kinase A signalling pathway, leading to rapid activation of astrocyte glucose metabolism and the release of lactate, which supplements the extracellular pool of readily available energy substrates. Experimental mouse models involving conditional deletion of the gene encoding A2B receptors in astrocytes showed that adenosine-mediated metabolic signalling is essential for maintaining synaptic function, especially under conditions of high energy demand or reduced energy supply. Knockdown of A2B receptor expression in astrocytes led to a major reprogramming of brain energy metabolism, prevented synaptic plasticity in the hippocampus, severely impaired recognition memory and disrupted sleep. These data identify the adenosine A2B receptor as an astrocytic sensor of neuronal activity and show that cAMP signalling in astrocytes tunes brain energy metabolism to support its fundamental functions such as sleep and memory.