Sahih al-Bukhari 1131
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
أَحَبُّ الصَّلاَةِ إِلَى اللَّهِ صَلاَةُ دَاوُدَ ـ عَلَيْهِ السَّلاَمُ ـ وَأَحَبُّ الصِّيَامِ إِلَى اللَّهِ صِيَامُ دَاوُدَ، وَكَانَ يَنَامُ نِصْفَ اللَّيْلِ وَيَقُومُ ثُلُثَهُ وَيَنَامُ سُدُسَهُ، وَيَصُومُ يَوْمًا وَيُفْطِرُ يَوْمًا "
Narrated `Abdullah bin `Amr bin Al-`As:
Allah's Messenger (ﷺ) told me, "The most beloved prayer to Allah is that of David and the most beloved fasts to Allah are those of David. He used to sleep for half of the night and then pray for one third of the night and again sleep for its sixth part and used to fast on alternate days."
Full reference and source
Sahih al-Bukhari 1131 In-book : Book 19, Hadith 11 USC-MSA web (English) : Vol. 2, Book 21, Hadith 231 (deprecated)
View source on Sunnah.com (opens in a new tab)