Abu al-Zubayr narrates from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that a young man came to him. The people began to leave, but he remained seated. Some of the people said: O young man, go! Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) said: Leave him; something has kept him seated. When the people had gone, the young man said: O Ibn Abbas, I am a young man and I feel intense desire, and I rubbed my private part until I ejaculated. Ibn Abbas (may Allah be pleased with them both) said: This is better than fornication, and marrying a slave woman is better than it.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النكاح / 14133