It is narrated from Hazrat Mu'adh (may Allah be pleased with him) that the Holy Prophet (peace and blessings be upon him) said: Shall I not tell you the doors of goodness? Fasting is a shield, charity extinguishes sins just as water extinguishes fire, and a person's praying at midnight is among the doors of goodness. Then the Holy Prophet (peace and blessings be upon him) recited this verse from Surah As-Sajdah: "Their sides forsake their beds... they know."
Hadith Referenceمسند احمد / مسند الأنصار رضي الله عنهم / 22133
Hadith Gradingحکم دارالسلام:صحيح بطرقه وشواهده، وهذا إسناد ضعيف لضعف شهر بن حوشب، ولم يدرك معاذا