Bidirectional interactions between immunity to infections and sleep. The immune response to the invasion of a pathogen and the consequent secretion of immunological mediators, such as interleukins and cytokines, are accompanied by responses by the endocrine and nervous systems, such as the secretion of cortisol and epinephrine. These substances can cross the blood-brain barrier to reach their receptors in various neural structures or may have a vagal input to modulate the responses that maintain homeostasis. This modulation can also be exploited by pathogens to ensure establishment of the infection and completion of its life cycle. However, this series of events has a complex relationship: infections can modulate patterns of behavior, such as sleep, and such primary functions can alter immune and endocrine system functions. For example, the effects of sleep deprivation on the immune and endocrine response support that sleep is fundamental in maintaining homeostasis—its absence leads to physiological disorders and possibly death. Thus, complex systems must be studied to identify the interactions between 2 or more variables in various contexts to determine the mechanisms that are involved in preserving this balance.