The night prayer consists of pairs and when you see the approach of dawn, make this number odd by one rak'ah. It was said to Ibn 'Umar: What does the (word) pair imply? He said: (It means) that salutation is uttered after every two rak'ahs.
أَنَّ رَسُولَ اللَّهِ ﷺ قَالَ صَلاَةُ اللَّيْلِ مَثْنَى مَثْنَى فَإِذَا رَأَيْتَ أَنَّ الصُّبْحَ يُدْرِكُكَ فَأَوْتِرْ بِوَاحِدَةٍ فَقِيلَ لاِبْنِ عُمَرَ مَا مَثْنَى مَثْنَى قَالَ أَنْ يُسَلِّمَ فِي كُلِّ رَكْعَتَيْنِ