Ash-Shaafiʻi used to divide his nights into three sections: one third of the night for writing, one-third for performing night prayer, and one-third for sleeping.
Shaykh Ibn ʻUthaymeen wrote:
“Seeking knowledge is better and more rewardable than any voluntary acts of worship; it is better than performing the Dhuha prayer, night prayer, and all voluntary acts of worship. This is why Abu Hurayrah
Shaykh Ibn ʻUthaymeenused to devote his nights to memorizing hadeeth instead of performing night prayer. The Prophet
said to him in this regard, “Perform the Witr prayer before you sleep.” He
approved of his act and did not forbid him from seeking knowledge at night, nor did he order him to devote his night to performing the night prayer instead. This is a very important rule for us to understand. Hence, when the seeker of knowledge engages in discussing, revising, studying, and memorizing the knowledge that he has acquired, then that is better than performing the night prayer and fasting…”