Yes, flies sleep at night. Common house flies and fruit flies are diurnal animals, meaning they’re active during the day and rest when it gets dark. This isn’t just passive inactivity. Flies enter a genuine sleep state with measurable changes in how deeply they can be roused, and they need this sleep to function normally.
How Scientists Know Flies Are Actually Sleeping
For a long time, it was unclear whether a motionless fly was truly sleeping or simply sitting still. Researchers settled the question by establishing a clear behavioral definition: if a fly remains still for more than five minutes, it’s asleep. That threshold wasn’t arbitrary. After five minutes of immobility, flies become significantly harder to wake up, requiring stronger stimuli like vibrations or light changes to get a response. This elevated arousal threshold is one of the hallmarks of sleep across the animal kingdom, from humans to insects.
The other major indicator is what happens when you prevent flies from sleeping. Just like sleep-deprived humans, flies that are kept awake show impairments in learning, memory, visual attention, and even recovery from injury. And when finally allowed to rest, they sleep longer and more deeply than usual to compensate, recovering roughly 30 to 40 percent of lost sleep over the following 48 hours. This “rebound” effect is considered one of the strongest pieces of evidence that what flies do at night is true sleep, not just idleness.
What a Fly’s Sleep Schedule Looks Like
Under a standard cycle of 12 hours of light and 12 hours of dark, flies show two peaks of activity: one around dawn and one around dusk. Between those peaks, they take a midday nap (sometimes called a “siesta”), then settle into a long, consolidated period of sleep at night. House flies move to specific overnight resting spots late in the day and remain inactive there until morning.
The nighttime sleep period is the deeper and more important one. Sleep episodes at night are significantly longer than daytime naps, and the arousal threshold is higher, meaning flies are in a deeper sleep state. Daytime rest tends to be lighter and more fragmented by comparison.
Male and female flies follow noticeably different schedules. Males sleep heavily during both day and night, logging an average of about 10 hours of total sleep per day. Females sleep far less overall, averaging around 5 hours, but the difference is almost entirely in daytime sleep. At night, females sleep just as much as males. In mated females, daytime sleep drops by roughly 60 percent after mating, and this reduction persists for at least eight days.
The Internal Clock That Controls It
Flies don’t just sleep because it’s dark. They have an internal circadian clock that actively drives the transition between waking and sleeping. This clock involves specific groups of neurons in the brain that either promote wakefulness or suppress it depending on the time of day.
One set of wake-promoting neurons gradually reduces its firing rate as evening approaches, effectively releasing the brakes on sleep once darkness falls. A separate group of neurons does the opposite job at the end of the night, releasing a wake-promoting chemical signal in the final hours before dawn. This is why flies often start moving slightly before the lights come on: their brain is already anticipating morning. Even in constant darkness with no light cues at all, flies maintain a roughly 24-hour rhythm of activity and rest, cycling with a period of about 23.8 hours.
Where Flies Go to Sleep
If you’ve ever noticed that flies seem to vanish in the evening, it’s because they actively seek out resting spots before nightfall. House flies move to sheltered surfaces like ceilings, walls, or the undersides of leaves and overhangs. They tend to choose locations that offer some protection, and they remain completely inactive there through the night. You’ve probably seen this if you’ve ever found a fly sitting motionless on a ceiling after dark: it’s not just resting, it’s sleeping.
How Light and Temperature Affect Fly Sleep
Light color has a surprisingly strong effect on when and how deeply flies sleep. Under blue or green light, flies become more active at night and sleep more deeply during the day, essentially inverting their normal pattern. This appears to reflect an aversion to those wavelengths: the flies avoid being active under blue and green light and shift their activity into darker periods instead. Red light has a different effect, reducing sleep depth during both day and night. Under normal white light, flies maintain the standard pattern of daytime activity and deep nighttime sleep.
Temperature also plays a role. Laboratory studies typically maintain flies at about 25°C (77°F), which supports normal sleep architecture. The midday siesta becomes more pronounced in warmer conditions, which makes ecological sense: in the wild, resting during the hottest part of the day conserves energy and reduces the risk of drying out.
The Brain Regions Behind Fly Sleep
No single “sleep center” controls rest in the fly brain. Instead, several interconnected structures work together. A region called the fan-shaped body contains neurons that actively promote sleep by releasing inhibitory signals that suppress movement. The mushroom bodies, which are best known for their role in memory, also regulate sleep and appear to be where the connection between sleep and memory consolidation plays out. When food is plentiful, certain mushroom body neurons increase sleep to support memory formation. Under starvation, a different set of neurons allows memory consolidation to happen without sleep, letting the fly stay awake to search for food.
Disrupting sleep alters the physical structure of connections within these brain regions. Sleep-deprived flies show elevated levels of a protein involved in synaptic signaling within the mushroom bodies, suggesting that one function of sleep is to maintain and reset the brain’s neural connections, a process that parallels what researchers believe happens in mammalian brains during sleep.
Is Sleep Universal in Flies?
Every fly species studied so far sleeps, and the pattern is consistent: flies are diurnal and sleep primarily at night. This holds true for the common house fly and the fruit flies frequently seen around overripe bananas. More broadly, sleep has been identified in every animal species examined to date, from mammals to insects. In fruit flies specifically, sleep shares most of the fundamental features that define sleep in mammals, including circadian timing, increased arousal thresholds, homeostatic rebound after deprivation, and sensitivity to the same types of pharmacological agents that affect human sleep.

