Sayyiduna Abdullah bin Amr (may Allah be pleased with them both) said that a man came to the Prophet (peace and blessings be upon him) and said: O Messenger of Allah, permit me to castrate myself. The Messenger of Allah (peace and blessings be upon him) said: "The castration of my Ummah is fasting and standing in prayer at night."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 13705