Sahih Muslim 1159 k
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
إِنَّ أَحَبَّ الصِّيَامِ إِلَى اللَّهِ صِيَامُ دَاوُدَ وَأَحَبَّ الصَّلاَةِ إِلَى اللَّهِ صَلاَةُ دَاوُدَ عَلَيْهِ السَّلاَمُ كَانَ يَنَامُ نِصْفَ اللَّيْلِ وَيَقُومُ ثُلُثَهُ وَيَنَامُ سُدُسَهُ وَكَانَ يَصُومُ يَوْمًا وَيُفْطِرُ يَوْمًا "
Abdullah b. 'Amr (Allah be pleased with both of them) reported Allah's Messenger (ﷺ) as saying:
With Allah the best fasting is that of David and the best prayer is that of David (peace be upon him) for he slept half of the night and stood for prayer for the third of it and (then) slept the sixth part of it and he observed fast one day and broke on the other.
Full reference and source
Sahih Muslim 1159 k In-book : Book 13, Hadith 245 USC-MSA web (English) : Book 6, Hadith 2595 (deprecated)
View source on Sunnah.com (opens in a new tab)