To perform a light ablution
Narrated Kuraib: Ibn `Abbas said, “The Prophet (sallallahu ‘alaihi wa sallam) slept till he snored and then prayed (or probably lay till his breath sounds were heard and then got up and prayed).” Ibn `Abbas added: “I stayed overnight in the house of my aunt, Maimuna, the Prophet (sallallahu ‘alaihi wa sallam) slept for a part of the night, (See Fath-al-Bari page 249, Vol. 1), and late in the night, he got up and performed ablution from a hanging water skin, a light (perfect) ablution and stood up for the prayer. I, too, performed a similar ablution, then I went and stood on his left. He drew me to his right and prayed as much as Allah wished, and again lay and slept till his breath sounds were heard. Later on the Mu’adh-dhin (call maker for the prayer) came to him and informed him that it was time for Prayer.
The Prophet (sallallahu ‘alaihi wa sallam) went with him for the prayer without performing a new ablution.” (Sufyan said to `Amr that some people said, “The eyes of Allah’s Messenger (sallallahu ‘alaihi wa sallam) sleep but his heart does not sleep.” `Amr replied, “I heard `Ubaid bin `Umar saying that the dreams of Prophets were Divine Inspiration, and then he recited the verse: ‘I (Abraham) see in a dream, (O my son) that I offer you in sacrifice (to Allah).” (37.102)