Doing wudoo’ before going to sleep is one of the things which is it recommended to do before going to sleep.
A hadeeth was narrated to this effect, in which the Prophet (peace and blessings of Allaah be upon him) said: “When you go to bed, do wudoo’ as for prayer.” (Narrated by al-Bukhaari, 247; Muslim 2710).
Ibn Hajar said: The apparent meaning is that it is mustahabb for everyone who wants to go to sleep to renew his wudoo’, even if he already has wudoo’. It may be interpreted as applying only to the one who has broken his wudoo’.
Al-Nawawi said: if a person has wudoo’, that is sufficient for him, because the point is to go to sleep having wudoo’, lest he die in his sleep, and so that he dreams will be more true, and so that the Shaytaan will be less likely to play with his dreams and terrify him.