Sahih Bukhari Volume 2, Book 21, Hadith Number 231.
Narated By Abdullah bin ‘Amr bin Al-‘As : Allah’s Apostle told me, “The most beloved prayer to Allah is that of David and the most beloved fasts to Allah are those of David. He used to sleep for half of the night and then pray for one third of the night and again sleep for its sixth part and used to fast on alternate days.”