This article describes a protocol for the manipulation of molecular targets in the cerebral cortex using adeno-associated viruses and for monitoring the effects of this manipulation during wakefulness and sleep using electrocorticographic recordings.