This also includes a physiological response to cancer - deemed cancer fatigue. Moderate exercise appears to help with this.
Of course, infection and other disease may require rest, particularly at the outset, with this caveat:
Doug Wallace, who directs the Center for Molecular and Mitochondrial Medicine and Genetics at the University of California, Irvine, notes that while bed rest is important at the beginning an infection, after that "it can be bad because you literally down-regulate muscle function, and with that, the number and efficiency of mitochondria also go down."
So at some point, moderate exercise will help you get better. Anecdotally, I've noticed this when training for marathons. If I feel I'm getting sick, it can be a two edged sword. It might make me bonk worse. And there's nothing worse than that kind of bonk - you're out of it and can even get sicker! But on the other side, it seems to make me get better sooner. I've noticed even when training with P90X, I didn't get sick much, and when I did (ironically on an off week) I got better quicker. Probably the old moderate exercise revving up my immune system response again!