Does Job 31:7 ("Or if any spot has stuck to my hands") speak of masturbation?
I spoke with a man who has recently written a commentary on Job, and he indicated that he did not recall coming across the interpretation you have suggested. Your interpretation would be very specific, and thus a bit limiting. (One's hands can get a person into a great deal of trouble when it comes to sexual matters.) I am inclined to see verse 7 as covering the whole sweep of how one's body might be involved in sexual sin -- feet (i.e. where one goes), heart (thoughts, etc.), eyes, hands.
While a broader interpretation regarding the hands would include the possibility of masturbation, it would not restrict the meaning to this one area of sexual sin. In my experience, it is helpful to explore possible meanings, such as the one you have suggested, but there seems to be nothing compelling in the text which necessitates it.
Articles related to Matthew: