When you have the flu you should try and stay in bed for at least the first 1 to 3 days as much as possible to allow your body to get plenty of rest.
Drink plenty of fluids to stay hydrated and the rest will also help your body recover easier and sooner from the flu even though it's hard to just lay in bed all day for 3 days it's best to do so.
Then after 2 to 3 days you can get out of bed more if you're feeling up to it and even getting out and getting some fresh air can help cleanse your lungs out and get rid of the germs.
You don't have to stay in bed though with the flu if you don't want too as you'll still recover from the flu even without bed rest but staying in bed until you feel better is the best if possible.