The player or creature simply needs to take one long rest to recover one point of exhaustion. This means that if a player has five levels of exhaustion, then they will need five long rests before they are fully recovered. In addition, the long rest must also include the consumption of food and water.