Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
muslim:1159lMuḥammad b. Rāfiʿ > ʿAbd al-Razzāq > Ibn Jurayj > ʿAmr b. Dīnār > ʿAmr b. Aws > ʿAbdullāh b. ʿAmr b. al-ʿĀṣ

The best fasting in the eye of Allah is that of David, for he fasted for half of the age (he fasted on alternate days), and the best prayer in the eye of Allah, the Exalted and Majestic, is that of David (peace be upon him), for he slept for half of the night and then stood for prayer and then again slept. He prayed for one-third of the night after midnight. He (the narrator) said: I asked 'Amr b. Dinar whether 'Amr b. Aus said that he stood for prayer one-third of the night after midnight. He said: Yes.  

مسلم:١١٥٩lوَحَدَّثَنِي مُحَمَّدُ بْنُ رَافِعٍ حَدَّثَنَا عَبْدُ الرَّزَّاقِ أَخْبَرَنَا ابْنُ جُرَيْجٍ أَخْبَرَنِي عَمْرُو بْنُ دِينَارٍ أَنَّ عَمْرَو بْنَ أَوْسٍ أَخْبَرَهُ عَنْ عَبْدِ اللَّهِ بْنِ عَمْرِو بْنِ الْعَاصِ ؓ

أَنَّ النَّبِيَّ ﷺ قَالَ أَحَبُّ الصِّيَامِ إِلَى اللَّهِ صِيَامُ دَاوُدَ كَانَ يَصُومُ نِصْفَ الدَّهْرِ وَأَحَبُّ الصَّلاَةِ إِلَى اللَّهِ ﷻ صَلاَةُ دَاوُدَ عَلَيْهِ السَّلاَمُ كَانَ يَرْقُدُ شَطْرَ اللَّيْلِ ثُمَّ يَقُومُ ثُمَّ يَرْقُدُ آخِرَهُ يَقُومُ ثُلُثَ اللَّيْلِ بَعْدَ شَطْرِهِ قَالَ قُلْتُ لِعَمْرِو بْنِ دِينَارٍ أَعَمْرُو بْنُ أَوْسٍ كَانَ يَقُولُ يَقُومُ ثُلُثَ اللَّيْلِ بَعْدَ شَطْرِهِ قَالَ نَعَمْ  


See similar narrations below:

Collected by Aḥmad
ahmad:6921Muḥammad b. Bakr And ʿAbd al-Razzāq > Ibn Jurayj Warawḥ > Ibn Jurayj > ʿAmr b. Dīnār > ʿAmr b. Aws > ʿAbdullāh b. ʿAmr b. al-ʿĀṣ

[Machine] The Messenger of Allah ﷺ said, "The most beloved fasting to Allah is the fasting of David, as he used to fast half of the year. And the most beloved prayer to Allah is the prayer of David, as he used to sleep half of the night, then he would wake up and pray, and then he would sleep again, and then he would wake up and pray one-third of the night after the half."  

أحمد:٦٩٢١حَدَّثَنَا مُحَمَّدُ بْنُ بَكْرٍ وَعَبْدُ الرَّزَّاقِ قَالَا حَدَّثَنَا ابْنُ جُرَيْجٍ وَرَوْحٌ قَالَ أَخْبَرَنَا ابْنُ جُرَيْجٍ أَخْبَرَنِي عَمْرُو بْنُ دِينَارٍ أَنَّ عَمْرَو بْنَ أَوْسٍ أَخْبَرَهُ عَنْ عَبْدِ اللهِ بْنِ عَمْرِو بْنِ الْعَاصِ

أَنَّ رَسُولَ اللهِ ﷺ قَالَ أَحَبُّ الصِّيَامِ إِلَى اللهِ صِيَامُ دَاوُدَ كَانَ يَصُومُ نِصْفَ الدَّهْرِ وَأَحَبُّ الصَّلَاةِ إِلَى اللهِ صَلَاةُ دَاوُدَ كَانَ يَرْقُدُ شَطْرَ اللَّيْلِ ثُمَّ يَقُومُ ثُمَّ يَرْقُدُ آخِرَهُ ثُمَّ يَقُومُ ثُلُثَ اللَّيْلِ بَعْدَ شَطْرِهِ