Gentlemen,
There is no commandment in Scripture anywhere that speaks for or against masturbation. There are passages that, as For His Glory said, speak against lust so if lust is part of a person's masturbation then they are wrong in that.
Please forgive me if I get a little too graphic, but I assume we are all adults here; and I promise not to be tooo graphic.
Let us say for a minute that there is a married couple. This couple enjoy watching each other masturbate. The couple fantasize about each other while the other pleasures themselves. There is no sin in this. As Heb 13:4 says, "Marriage is honorable among all, and the bed undefiled; but fornicators and adulterers God will judge." I take this verse to mean (since there is no context around it to limit the application) that there is nothing wrong with any sex act a couple performs within the confines of the two of them. So there are definitely times and situations where masturbation is not sin. But there are times when it could be a sin (or invite sin) as well.
Is masturbation fornication? No, I don't think so.
Is fantasizing about fornication sin (lust)? Yes.
And this topic falls right in line with the topic of eating meat sacrificed to idols. If you believe that there is sin in masturbating, then for you there is sin. If you believe that there is no sin (apart from lust), then for you there is no sin. (1 Cor 8).