The Messenger of Allah ﷺ said, "Do not be like so-and-so. He used to pray at night, then he abandoned praying at night."
حدثنا محمد بن الصباح أنبأنا الوليد بن مسلم عن الأوزاعي عن يحيى بن أبي كثير عن أبي سلمة
قال رسول الله ﷺ لا تكن مثل فلان كان يقوم الليل فترك قيام الليل
Bukhari narrated it in the Book of Marriage, chapter "Your wife has a right over you," hadith 5199, from the hadith of Uzai with this wording at length, though differently phrased, and the hadith has other routes in his collection. Muslim also narrated it in the Book of Fasting, chapter on the prohibition of fasting every day for one who is harmed by it or who thereby neglects a duty, etc., hadith 1159, through routes from Yahya with this wording.