I heard the Prophet ﷺ being asked how one should pray at night. He said, "Each of you should pray two by two, and when he fears the approach of dawn, let him pray one rakah to make it odd."
حدثنا سفيان عن الزهري
سمعت النبي ﷺ سئل كيف يصلى بالليل قال ليصل أحدكم مثنى مثنى فإذا خشي الصبح فليوتر بواحدة