I'm often approached by individuals who have suffered some sort of injury that will prevent them from training for a few weeks at a time. For some, this is a serious issue. Not because they are missing training time but because they don't want to lose a ounce of muscle.
Lets be blunt, it's easier to gain size than it is to maintain size under extreme conditions or even during weight loss attempts. I'm not going to come off as anything that I am not, I'm not a miracle worker and I won't tell you some unknown herb is the answer.
The simple answer is to tell people to pound protein shakes but during either a bad flu or stomach issue that isn't going to feel good.
First, I'd recommend that during anytime of non-activity you really high dose fish oils. They'll help to decrease the inflammation if the lay off is due to injury but it will also help with hormonal signaling so that you lose some bodyfat over muscle tissue.
BCAA's are another supplement that I'd highly advise as well. L-leucine is such a anti-catabolic supplement that just a few grams of it will help to prevent muscle tissue being eaten for energy.
Liquid food. While food might not be pleasing blending up multiple shakes is. You can add the nutrients that you need.
Worry Less. I know this seems like a easy one but worrying about losing muscle is going to cause you to drown in a sea of cortisol which will just eat up more tissue. Relax, you'll be ok.