Some of the companions of the messenger of Allah said :" O Messenger of Allah, the affluent have made of with the rewards, they pray as we pray they fast as we fast, and they give away in charity the superfluity of their wealth." He said:" Has not Allah made things for you to give away in charity ? every tasbihah is a charity, every takbirah is a charity, every tahmidah is a charity, and every tahlilah is a charity, to enjoin a good action is a charity, to forbid an evil action is a charity, and in the sexual act of each of you there is a charity." They said: "O Messenger of Allah, when one of us fulfils his sexual desire will he have some reward for that?" He said: "Do you not think that were he to act upon it unlawfully he would be sinning ? Likewise, if he has acted upon it lawfully he will have a reward."
Related by Muslim.