Sahih Muslim Book 6, Hadith Number 2596.

Chapter : Forbiddance to observe perpetual fast and excellence of observing fast on alternate days.

‘Abdullah b. ‘Amr b. al-‘As reported Allah’s Messenger (may peace be upon him) as saying: 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.