A Pokémon with Hydration will cure itself of any status conditions during rain at the end of each turn. This includes self-inflicted conditions, such as those from using Rest.