Reference: Fataawa al-Lajnah ad-Daa.imah lil-Buhooth al-‘Ilmiyyah wal-Iftaa. – Fatwa No.2192
Fataawa Ramadhaan – Volume 2, Page 446, Fatwa No.373
Question: If a Muslim’s desire is aroused during the day in Ramadhaan and he finds no recourse but to masturbate, does this nullify his fast and does he have to make up for this day and make any expiation for this act?
Response: Masturbating in Ramadhaan or other than Ramadhaan is prohibited (haraam) as Allaah (Subhaanahu wa-Ta’aala) has said:
{And those who guard their chastity (i.e. private parts from illegal sexual acts). Except with their wives and the [women slaves and captives] whom their right hand possess, – for [them] they are not to be blamed. But whosoever seeks beyond that, then it is those who are trespassers} [Soorah al-Ma’aarij, Aayah 29-31].
So one who is fasting during the day and then does this must make repentance to Allaah (Subhaanahu wa-Ta’aala) and also make up the fast for that particular day. There is no expiation to make because the expiation is specific only to [one who commits] sexual intercourse.
And with Allaah lies all the success, and may Allaah send prayers and salutations upon our Prophet Muhammad ﷺ and his family and his companions.