Abdullah bin Amr bin As reported,

The Messenger of Allah ﷺ told 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 half the night, stand in prayer for a third of it, and sleep for the remaining sixth, and he would fast one day and break his fast the next."

Bukhari 1131

Sahih

حدثنا علي بن عبد الله قال حدثنا سفيان قال حدثنا عمرو بن دينار أن عمرو بن أوس أخبره أن

عبد الله بن عمرو بن العاص رضي الله عنهما

أخبره أن رسول الله ﷺ قال له أحب الصلاة إلى الله صلاة داود عليه السلام وأحب الصيام إلى الله صيام داود وكان ينام نصف الليل ويقوم ثلثه وينام سدسه ويصوم يوما ويفطر يوما

البخاري 1131صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Tahajjud
Chapter
Sleeping near dawn
Numbering
Darussalam 1131
Bukhari 1131