‘Abdallah b. ‘Amr reported God’s Messenger as saying, “The prayer dearest to God is David’s and the fasting dearest to God is David’s. He would sleep half the night, get up to pray for a third of it, then sleep the remaining sixth; and he would fast on alternate days."
Jabir said he heard the Prophet say, “There is an hour during the night at which no Muslim man will ask God for good in this world and the next without His giving it to him; and that applies to every night."
‘A’isha said that he, meaning God’s Messenger, would sleep in the early part of the night and keep awake in the latter part. If he then wished intercourse with his wife he satisfied his desire, and then went to sleep. If he was sexually defiled when the first call to prayer was made, he would get up and pour water on it, but if not, he performed the ablution for the prayer and then prayed two rak'as.
Narrated Abu Huraira reported God’s Messenger as saying:
Our Lord who is blessed and exalted descends every night to the lowest heaven when two-thirds of the night have passed and says, “Who supplicates me so that I may answer him? Who asks of me so that I may give to him? Who asks my forgiveness so that I may forgive him?”
(Bukhari and Muslim.) In a version by Muslim it is said that He then spreads out His hands and says, “Who will lend to One who is neither indigent nor unjust?"* till the dawn breaks.
*The lending mentioned here is presumably the doing of good works.