He reported that the Messenger of Allah ﷺ said to him, "The most beloved prayer to Allah is the prayer of Dawud , and the most beloved fasting to Allah is the fasting of Dawud. He would sleep for half the night, stand in prayer for a third of it, and sleep for a sixth of it, and he would fast one day and break his fast the next."
أخبر أن رسول الله ﷺ قال له: أحب الصلاة إلى الله صلاة داود عليه السلام وأحب الصيام إلى الله صيام داود وكان ينام نصف الليل، ويقوم ثلثه، وينام سدسه، ويصوم يوما ويفطر يوما.
Bukhari related it in the book of tahajjud (1131), and Muslim in the book of fasting (189/1159), both from the hadith of Sufyan bin Uyayna, from Amr bin Dinar, from Amr bin Aws, from Abdullah bin Amr bin As, and he narrated it.Muslim also related it from the hadith of Ibn Jurayj, who said, "Amr bin Dinar informed me that Amr bin Aws informed him, from Abdullah bin Amr bin As, that the Prophet ﷺ said, 'The fasting most beloved to Allah is the fasting of Dawud, for he used to fast half the time. And the prayer most beloved to Allah is the prayer of Dawud, for he used to sleep half the night, then rise, then sleep during its last part, rising for a third of the night after its half.'"He said, "I said to Amr bin Dinar, 'Did Amr bin Aws used to say, he rises for a third of the night after its half?' He said, 'Yes.'"Hafiz said, "Its apparent meaning is that specifying the standing prayer as a third comes from the narrator's own explanation, which would make the first narration contain an insertion (idraj). But it is also possible that his statement 'Amr bin Aws' mentioning it means by way of his chain of transmission, in which case it would not be an insertion." Fath al-Bari (3/17).