The Narration (hadith)
The Messenger of Allah (Allah bless him and give him peace) said, ‘The most beloved prayer to Allah was the prayer of Dawud (upon him be peace) and the most beloved of fasting to Allah was that of Dawud; he used to sleep half the night, stand for a third of it and sleep a sixth of it; and he would fast a day and not fast the next’ [Bukhari]
The Legal Night
In order to understand what is meant, we must first define what is understood by ‘night’ in the narration (hadith) above. Hence, the legal (shar`i) night is between the Maghrib prayer and the Fajr prayer.
The Prayer of Dawud (upon him be peace)
The Prophet Dawud (upon him be peace) would break his night up into parts: a portion for his Lord and a portion for himself. The reason he would sleep during the first half of the night was in order to strengthen himself for worship in the latter half. He would then rise for a third of the night. This third of the night is of the greatest of times for worship and of the best of the moments of the day and night. Finally, he would sleep for the last sixth of the night in order to rest and refresh himself for worship at dawn. [Ibn Hajar al-`Asqalani, Fath al-Bari Sharh Sahih al-Bukhari; Munawi, Fayd al-Qadir Sharh al-Jami` al-Saghir]
Moreover, Ibn Daqiq al-`Id indicated to the fact that sleeping the last sixth of the night was closer to hiding one’s spiritual works from other people because it seems as though one has just awakened. [ibid.]
And Allah knows best.