The Messenger of Allah ﷺ said to me, "The most beloved fasting to Allah Almighty is the fasting of Dawud, and the most beloved prayer to Allah Almighty is the prayer of Dawud. He would sleep half the night, stand in prayer for a third of it, and sleep for a sixth of it. He would fast one day and break his fast the next."
حدثنا أحمد بن حنبل ومحمد بن عيسى ومسدد والإخبار في حديث أحمد قالوا حدثنا سفيان قال سمعت عمرا قال أخبرني عمرو بن أوس سمعه من
قال لي رسول الله ﷺ أحب الصيام إلى الله تعالى صيام داود وأحب الصلاة إلى الله تعالى صلاة داود كان ينام نصفه ويقوم ثلثه وينام سدسه وكان يفطر يوما ويصوم يوما
Related by Bukhari, Tahajjud, chapter on one who sleeps before dawn, no. 1131, and Muslim, Fasting, chapter on the prohibition of fasting continuously for one who is harmed by it, etc., no. 189/1159, from the hadith of Sufyan bin Uyayna, and it is also found in Musnad Ahmad, 2/160.