Nafi’ (may Allah have mercy on him) says that whenever Sayyiduna Ibn Umar (may Allah be pleased with them both) was asked about Witr, he would say: If I wish to perform Witr before sleeping, and then later intend to pray during the night, I add one rak’ah to the rak’ah I already prayed for Witr, then I continue to pray two rak’ahs at a time. When I have completed my prayer, I combine one rak’ah with two rak’ahs and perform Witr, because the Prophet (peace and blessings be upon him) commanded that the last prayer of the night should be Witr.
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 6190