It is narrated from Sayyiduna Wa'il bin Hujr (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) used to give the salam (ending the prayer) to his right and to his left.
Hadith Referenceالمعجم الكبير للطبراني / باب الواو / 18222