Sleep is fundamental to animal survival but is a vulnerable state that also limits how much time can be devoted to critical wake-dependent activities 1. Although many animals are day-active and sleep at night, they exhibit a midday nap, or "siesta," that can vary in intensity and is usually more prominent on warm days. In humans, the balance between maintaining the wake state or sleeping during the day has important health implications 2, but the mechanisms underlying this dynamic regulation are poorly understood. Using the well-established Drosophila melanogaster animal model to study sleep 3, we identify a new wake-sleep regulator that we term daywake (dyw). dyw encodes a juvenile hormone-binding protein 4 that functions in neurons as a day-specific anti-siesta gene, with little effect on sleep levels during the nighttime or in the absence of light. Remarkably, dyw expression is stimulated in trans via cold-enhanced splicing of the dmpi8 intron 5 from the reverse-oriented but slightly overlapping period (per) clock gene 6. The functionally integrated dmpi8-dyw genetic unit operates as a "behavioral temperate acclimator" by increasingly counterbalancing siesta-promoting pathways as daily temperatures become cooler and carry reduced risks from daytime heat exposure. While daily patterns of when animals are awake and when they sleep are largely scheduled by the circadian timing system, dyw implicates a less recognized class of modulatory wake-sleep regulators that primarily function to enhance flexibility in wake-sleep preference, a behavioral plasticity that is commonly observed in animals during the midday, raising the possibility of shared mechanisms.