It is narrated from Hazrat Aisha (may Allah be pleased with her) that when the Prophet (peace and blessings be upon him) wished to sleep in a state requiring ghusl (ritual bath), he would perform ablution (wudu) as is done for prayer.