Sleep, a state of quiescence associated with growth and restorative processes, is conserved across species. Invertebrates including the nematodeCaenorhabditis elegansexhibit sleep-like states during development and periods of satiety and stress. Here we describe two methods to study behavior and associated neural activity during sleep and awake states in adultC. elegans. A large microfluidic device facilitates population-wide assessment of long-term sleep behavior over 12 h, including effects of fluid flow, oxygen, feeding, odors, and genetic perturbations. Smaller devices allow simultaneous recording of sleep behavior and neuronal activity, and a closed-loop sleep detection system delivers chemical stimuli to individual animals to assess sleep-dependent changes to neural responses. Sleep increased the arousal threshold to aversive chemical stimulation, yet sensory neuron (ASH) and first-layer interneuron (AIB) responses were unchanged. This localizes adult sleep-dependent neuromodulation within interneurons presynaptic to the AVA premotor interneurons, rather than afferent sensory circuits.