One remarkable feature of behavior is an animal's ability to rapidly switch between activity states such as locomotion and quiescence; however, how the brain regulates these spontaneous transitions based on the animal's perceived environment is not well understood. Here we show a C. elegans sleep-like state on a scalable platform that enables simultaneous control of multiple environmental factors including temperature, mechanical stress, and food availability. This brief quiescent state, we refer to as "μSleep," occurs spontaneously in microfluidic chambers, which allows us to track animal movement and perform whole-brain imaging. With these capabilities, we establish that μSleep meets the behavioral requirements of C. elegans sleep and depends on multiple external factors. Specifically, we show that μSleep is regulated by satiety and temperature, which is consistent with prior reports of C. elegans sleep. Additionally, we show for the first time that C. elegans sleep can be induced through mechanosensory pathways. Together, these results establish a rich model system for studying how animals process multiple sensory pathways to regulate behavioral states.