(5) باب تَحْرِيضِ النَّبِيِّ صلى الله عليه وسلم عَلَى صَلاَةِ اللَّيْلِ وَالنَّوَافِلِ مِنْ غَيْرِ إِيجَابٍ
Narrated `Aisha:
Allah's Messenger (ﷺ) used to give up a good deed, although he loved to do it, for fear that people might act on it and it might be made compulsory for them. The Prophet (ﷺ) never prayed the Duha prayer, but I offer it.
Reference: Sahih al-Bukhari 1128
In-book reference: Book 19, Hadith 8
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 2, Book 21, Hadith 228