The Messenger of Allah ﷺ said, "Hold fast to standing in prayer at night, for it was the practice of the righteous before you. It draws you near to your Lord, wipes away evil deeds, and keeps you from sin."
حدثنا بذلك محمد بن إسماعيل: أخبرنا عبد الله بن صالح عن معاوية بن صالح، عن ربيعة بن يزيد، عن أبي إدريس الخولاني،
عن رسول الله ﷺ أنه قال: عليكم بقيام الليل فإنه دأب الصالحين قبلكم، وهو قربة إلى ربكم ومكفرة للسيئات ومنهاة للإثم.
Referencing, [hasan]. Bayhaqi also narrated it (2/502), from the hadith of Muhammad bin Ismail Sulami, from Abdullah bin Salih, with the same wording. A group also narrated it from him, as found in Tabarani (8/109, no. 7466) and elsewhere, among them Yahya bin Main, who narrated it from Abdullah bin Salih with the same wording, in Fadl Qiyam al-Layl wa Tahajjud by Muhammad bin Husayn Ajurri (no. 4). Ibn Khuzayma graded it sahih (2/177, no. 1135), as did Hakim, according to the standard of Bukhari (1/308), and Dhahabi agreed with him. Abu Hatim Razi found it objectionable (Ilal Hadith, no. 346). It is a hasan hadith. Baghawi graded it hasan (Sharh al-Sunnah, no. 922), as did Iraqi in Takhrij Ihya (1/354). Praise be to Allah.