What does the Islam says about self-masturbating? Is it true if you did such an act that your prayers for 40 days are not accepted?
All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
There is no sound Hadeeth that indicates that one's prayer will not be accepted for 40 days if he masturbates. Anyway, masturbation is forbidden, and its doer is considered sinful. But he will be rewarded for his prayers.
Here, we state that his prayer must prevent him from committing what is forbidden.
Allah Says (what means): {Indeed, prayer prohibits immorality and wrongdoing, and the remembrance of Allah is greater.} [Quran 29: 45]
For more benefit on the prohibition of masturbation, please refer to Fataawa 179859, 376036, 87952 and 81167.
Allah knows best.
You can search for fatwa through many choices