Actually, some scholars are of the opinion that there are several euphanisms in both the old and new testament that refer to masturbation in a positive way. "Covering the feet" is one that comes to mind in the OT. I understand that it was customary for the Jews to cover their feet with a cloth in order to keep from splashing semen on them. Could apply to taking a leak also.
The term "getting hold of ones vessel" is said by some to refer to masturbation as a means of preventing fornication.
There are several more. I'll try to find them if you;re interested.