Although the brain represents less than 5% of the body by mass, it utilizes approximately one quarter of the glucose used by the body at rest(1). The function of non rapid eye movement sleep (NREMS), the largest portion of sleep by time, is uncertain. However, one salient feature of NREMS is a significant reduction in the rate of cerebral glucose utilization relative to wakefulness(2-4). This and other findings have led to the widely held belief that sleep serves a function related to cerebral metabolism. Yet, the mechanisms underlying the reduction in cerebral glucose metabolism during NREMS remain to be elucidated. One phenomenon associated with NREMS that might impact cerebral metabolic rate is the occurrence of slow waves, oscillations at frequencies less than 4 Hz, in the electroencephalogram(5,6). These slow waves detected at the level of the skull or cerebral cortical surface reflect the oscillations of underlying neurons between a depolarized/up state and a hyperpolarized/down state(7). During the down state, cells do not undergo action potentials for intervals of up to several hundred milliseconds. Restoration of ionic concentration gradients subsequent to action potentials represents a significant metabolic load on the cell(8); absence of action potentials during down states associated with NREMS may contribute to reduced metabolism relative to wake. Two technical challenges had to be addressed in order for this hypothetical relationship to be tested. First, it was necessary to measure cerebral glycolytic metabolism with a temporal resolution reflective of the dynamics of the cerebral EEG (that is, over seconds rather than minutes). To do so, we measured the concentration of lactate, the product of aerobic glycolysis, and therefore a readout of the rate of glucose metabolism in the brains of mice. Lactate was measured using a lactate oxidase based real time sensor embedded in the frontal cortex. The sensing mechanism consists of a platinum-iridium electrode surrounded by a layer of lactate oxidase molecules. Metabolism of lactate by lactate oxidase produces hydrogen peroxide, which produces a current in the platinum-iridium electrode. So a ramping up of cerebral glycolysis provides an increase in the concentration of substrate for lactate oxidase, which then is reflected in increased current at the sensing electrode. It was additionally necessary to measure these variables while manipulating the excitability of the cerebral cortex, in order to isolate this variable from other facets of NREMS. We devised an experimental system for simultaneous measurement of neuronal activity via the elecetroencephalogram, measurement of glycolytic flux via a lactate biosensor, and manipulation of cerebral cortical neuronal activity via optogenetic activation of pyramidal neurons. We have utilized this system to document the relationship between sleep-related electroencephalographic waveforms and the moment-to-moment dynamics of lactate concentration in the cerebral cortex. The protocol may be useful for any individual interested in studying, in freely behaving rodents, the relationship between neuronal activity measured at the electroencephalographic level and cellular energetics within the brain.