In mammals, infection is detected by immune cells, which secrete cytokines to activate, both directly and indirectly, central nervous system neurons that regulate sleep. In Drosphila melanogaster (flies), infection, tissue injury and possibly heat stress are detected by the extra‐neural fat bodies, which then signal via cytokines to the nervous system to regulate sleep. In Caenorhabditis elegans (worms), environmental exposures that cause cellular injury/stress including high heat, ultraviolet light and toxins result in activation of unidentified cells that release the cytokine epidermal growth factor (EGF). EGF activates the single ALA neuron, which then signals via the collective action of several neuropeptides to induce sub‐programmes of sleep including anorexia, movement quiescence and elevated arousal threshold.