Yahya related to me from Malik from Nafi and Abdullah ibn Umar that a man asked the Messenger of Allah ﷺ about night prayers. The Messenger of Allah ﷺ said, "Night prayers are two by two, and when you are afraid that dawn is approaching, pray one raka to make what you have prayed odd."
أَنَّ رَجُلاً سَأَلَ رَسُولَ اللَّهِ ﷺ عَنْ صَلاَةِ اللَّيْلِ فَقَالَ رَسُولُ اللَّهِ ﷺ صَلاَةُ اللَّيْلِ مَثْنَى مَثْنَى فَإِذَا خَشِيَ أَحَدُكُمُ الصُّبْحَ صَلَّى رَكْعَةً وَاحِدَةً تُوتِرُ لَهُ مَا قَدْ صَلَّى