Reference: Majmoo’ al-Fataawa wal-Maqaalaat al-Mutanawwi’ah – Volume 21, Page 188
Question: Is it permissible for a man to acquire [and consume] some medicines which will reduce his sexual desires?
Response: There is no harm in [doing] that; however, it is not permissible to do so if it completely eliminates [the desire]. As for [only] reducing it, then there is no harm in that due to the obvious benefit [of doing so]. And the Messenger of Allaah ﷺ informed [the people] that fasting reduces the sexual desires, in his statement:
«O gathering of youth! Whoever amongst you is able, then he should get married; and whoever is unable, then he should fast, for that is indeed better for him», [and the authenticity of this hadeeth is] agreed upon.