The Messenger of Allah ﷺ said, "Do not pray witr with three rakahs. Pray witr with five or seven, and do not make it resemble the Maghrib prayer."
عن رسول الله ﷺ قال: لا توتروا بثلاث، أوتروا بخمس أو بسبع، ولا تشبه بصلاة المغرب.
No references are available.
Daraqutni (2/24) and Hakim in Mustadrak (1/304) both narrated it through Abdullah bin Sulayman bin Ashath, who said, Ahmad bin Salih narrated to us, who said, Abdullah bin Wahb narrated to us, who said, Sulayman bin Bilal informed us, from Salih bin Kaysan, from Abdullah bin Fadl, from Abu Salama bin Abdul-Rahman and Abdul-Rahman Araj, from Abu Hurairah, and he mentioned it. Bayhaqi (3/31) narrated it through another route from Ahmad bin Salih with the same wording. Daraqutni said, "All its narrators are reliable." Ibn Hibban narrated it in his Sahih (2429) through the route of Abdullah bin Wahb with the same wording. Hakim said, "Sahih according to the criteria of the two Shaykhs."Muhammad bin Nasr narrated it in his book on Witr (45), and from him Hakim in Mustadrak, through another route, from Arak bin Malik, from Abu Hurairah, with this wording, "Do not perform Witr with three in a way that resembles Maghrib, but perform Witr with five, or seven, or nine, or eleven, or more than that." Some narrated the hadith of Arak bin Malik from Abu Hurairah as a stopped report (mawquf). See Sunan al-Kubra (3/31–32). Ibn Hajar said in Talkhis (2/14), after attributing it to Daraqutni, Ibn Hibban, and Hakim, "All its narrators are reliable, and it is not harmed by the fact that some narrated it as a stopped report."The prohibition mentioned in this hadith regarding three units was out of concern for resembling the Maghrib prayer, even though performing Witr with three units is permissible without dispute, as established in sahih hadiths. Scholars have therefore interpreted the prohibition of three units as applying when it is prayed with two sittings and one taslim, whereas if the three units are prayed with a single sitting and one taslim, or with two taslims, the resemblance to the Maghrib prayer disappears. Allah knows best.As for what has been narrated from Ibn Masud, attributed to the Prophet, "The Witr of the night is three, like the Witr of the day, the Maghrib prayer," from Amash, its chain contains Yahya bin Zakariya, known as Ibn Abu Hawajib, who is daif, and no one else narrated it from Amash as a marfu report. This is what Daraqutni (2/28) said, after narrating it through the route of Yahya bin Zakariya Kufi, who said, Amash narrated to us, from Malik bin Harith, from Abdul-Rahman bin Yazid Nakhai, from Abdullah bin Masud, and he mentioned it.