Infection causes reduced activity, anorexia, and sleep, which are components of the phylogenetically conserved but poorly understood sickness behavior. We developed a Caenorhabditis elegans model to study quiescence during chronic infection, using infection with the Orsay virus. The Orsay virus infects intestinal cells yet strongly affects behavior, indicating gut-to-nervous system communication. Infection quiescence has the sleep properties of reduced responsiveness and rapid reversibility. Both the ALA and RIS neurons regulate virus-induced quiescence though ALA plays a more prominent role. Quiescence-defective animals have decreased survival when infected, indicating a benefit of quiescence during chronic infectious disease. The survival benefit of quiescence is not explained by a difference in viral load, indicating that it improves resilience rather than resistance to infection. Orsay infection is associated with a decrease in ATP levels, and this decrease is more severe in quiescence-defective animals. We propose that quiescence preserves energetic resources by reducing energy expenditures and/or by increasing extraction of energy from nutrients. This model presents an opportunity to explore the role of sleep and fatigue in chronic infectious illness.