It is narrated from Sayyiduna Ibn Umar (may Allah be pleased with them both) that the Prophet (peace and blessings be upon him) used to pray in sets of two rak‘ahs, then in the last part of the night he would add one rak‘ah to them and thus perform (three) witr.