It all depends on the individuals and why they are demoralized.
Give them team tasks that are acheivable and review the performance.
Meet with them as a group, and work towards a "reset"; a break from tomorrow being exactly the same as yesterday.
Schedule meetings with each team member individually. Ask their concerns. Learn, individually, why they're demoralized. Give them a path forward that avoids or mitigates some of the negatives. Be absolutely realistic; don't stretch the truth or lie, but give them an honest path to where they'd rather be.
In parallel, likely ramp up hiring, as you're not often getting through that with the entire team intact. Less