Human behavior is driven by specific neuronal activity and can be directly associated to characteristic brain states. The oscillatory activity of neurons contains information about the mental state of an individual, and the transition between different brain states is controlled by the neuromodulatory action of acetylcholine on nicotinic and muscarinic receptors. Manipulating brain waves bears high therapeutic interest in several neurological disorders, and can be achieved by transcranial direct current and magnetic stimulation techniques, and by optogenetics, although the clinical translation of the latter is hampered by the need of gene therapy. Here, we directly modulate brain waves with light using a photoswitchable muscarinic agonist. Synchronous slow wave activity can be disrupted in isolated cortical slices and in anesthetized mice. These results open the way to study the spatiotemporal distribution and the pharmacology of brain states, their transitions, and their links to cognition and behavior, in a diversity of wildtype organisms.