The Messenger of Allah ﷺ said: "Prayer at night is two by two, then when you want to finish, pray one rak'h which will make the total number that you prayed odd."
عَنْ رَسُولِ اللَّهِ ﷺ قَالَ صَلاَةُ اللَّيْلِ مَثْنَى مَثْنَى فَإِذَا أَرَدْتَ أَنْ تَنْصَرِفَ فَارْكَعْ بِوَاحِدَةٍ تُوتِرُ لَكَ مَا قَدْ صَلَّيْتَ