Yes sleep does help with flu recovery.
When you have the flu your body needs plenty of rest to recover from the flu so even just laying down often and getting plenty of fluids to stay hydrated can help get rid of the flu.
Normally people recover from the flu virus within 7 to 14 days and if the flu virus lasts longer than 14 days or seems to get worse then you should go to the doctor, emergency room or urgent care for treatment.
There's no cure for the flu however but they can put IV's in you to get you hydrated if you're feeling too weak.
It can be hard to sleep when you do have the flu but your body does need plenty of rest and at some time during the flu you might feel too week to even get out of the bed.
I once had the flu so bad that I couldn't get out of bed for a few days and I wet my pants.
So I cleaned up and had my husband go get me some adult diapers to wear while I had the flu so I could just use the diaper instead of getting up.
It was better to have a wet diaper than a wet bed or pants.