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."
أخبرنا إسحق بن إبراهيم قال أنبأنا عفان قال حدثنا حماد بن سلمة عن ثابت
أن نفرا من أصحاب النبي ﷺ قال بعضهم لا أتزوج النساء وقال بعضهم لا آكل اللحم وقال بعضهم لا أنام على فراش وقال بعضهم أصوم فلا أفطر فبلغ ذلك رسول الله ﷺ فحمد الله وأثنى عليه ثم قال ما بال أقوام يقولون كذا وكذا لكني أصلي وأنام وأصوم وأفطر وأتزوج النساء فمن رغب عن سنتي فليس مني
Muslim reported it in the Book of Marriage, Chapter on the recommendation of marriage for one whose soul longs for it and who can afford its expense, etc., hadith no. 1401, from the hadith of Hammad bin Salama, with this chain, and it is in Kubra, hadith no. 5324.