It is narrated from Abdullah bin Umar (may Allah be pleased with them both) that a man asked the Messenger of Allah (peace be upon him) about the night prayer, so the Messenger of Allah (peace be upon him) said: "The night prayer is in sets of two rak‘ahs. Then when one of you fears that dawn is approaching, he should pray one rak‘ah, and it will make all the prayer he has offered odd (witr)."
Hadith Referenceمسند الإمام الشافعي / كتاب الصلاة / 385
Hadith Takhrijاخرجه البخاري، الوتر، باب ماجاء في الوتر (990) ومسلم صلاة المسافرين، باب صلاة الليل مثنى مثنى والوتر ركعة من آخر الليل (749)