Anas bin Malik reported,

A group from among the companions of the Prophet ﷺ made various declarations. One said, "I will not marry women." Another said, "I will not eat meat." Another said, "I will not sleep on a bed." Another said, "I will fast and never break my fast."Word of this reached the Messenger of Allah ﷺ. He praised Allah and glorified Him, then said, "What is the matter with people who say such things? As for me, I pray and I sleep, I fast and I break my fast, and I marry women. Whoever turns away from my way is not from me."

Nasai 3219

Sahih

أخبرنا إسحق بن إبراهيم قال أنبأنا عفان قال حدثنا حماد بن سلمة عن ثابت

عن أنس

أن نفرا من أصحاب النبي ﷺ قال بعضهم لا أتزوج النساء وقال بعضهم لا آكل اللحم وقال بعضهم لا أنام على فراش وقال بعضهم أصوم فلا أفطر فبلغ ذلك رسول الله ﷺ فحمد الله وأثنى عليه ثم قال ما بال أقوام يقولون كذا وكذا لكني أصلي وأنام وأصوم وأفطر وأتزوج النساء فمن رغب عن سنتي فليس مني

النسائي 3219صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Marriage
Chapter
Prohibition of celibacy
Numbering
Darussalam 3219
Nasai 3219