Language:
كتاب أحاديث الأنبياء
60  
Prophets
(38)
Chapter: The most beloved Salat to Allah was the Salat of (the Prophet) Dawud, and the most beloved Saum was the Saum of Dawud
(38)
بَابُ أَحَبُّ الصَّلاَةِ إِلَى اللَّهِ صَلاَةُ دَاوُدَ
Sahih al-Bukhari 3420

Narrated `Abdullah bin `Amr:

Allah's Messenger (ﷺ) said to me, "The most beloved fasting to Allah was the fasting of (the Prophet) David who used to fast on alternate days. And the most beloved prayer to Allah was the prayer of David who used to sleep for (the first) half of the night and pray for 1/3 of it and (again) sleep for a sixth of it."

حَدَّثَنَا قُتَيْبَةُ بْنُ سَعِيدٍ، حَدَّثَنَا سُفْيَانُ، عَنْ عَمْرِو بْنِ دِينَارٍ، عَنْ عَمْرِو بْنِ أَوْسٍ الثَّقَفِيِّ، سَمِعَ عَبْدَ اللَّهِ بْنَ عَمْرٍو، قَالَ قَالَ لِي رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ أَحَبُّ الصِّيَامِ إِلَى اللَّهِ صِيَامُ دَاوُدَ، كَانَ يَصُومُ يَوْمًا وَيُفْطِرُ يَوْمًا، وَأَحَبُّ الصَّلاَةِ إِلَى اللَّهِ صَلاَةُ دَاوُدَ، كَانَ يَنَامُ نِصْفَ اللَّيْلِ وَيَقُومُ ثُلُثَهُ وَيَنَامُ سُدُسَهُ ‏"‏‏.‏
Reference : Sahih al-Bukhari 3420
In-book reference : Book 60, Hadith 92
USC-MSA web (English) reference : Vol. 4, Book 55, Hadith 631
  (deprecated numbering scheme)