Many people masturbate and fantasize about another person at the same time: that is sin. However, if it is possible for a person to masturbate without fantasizing when normal sexual activity is not possible or practical: that is release of sexual tension. Masturbation with illicit sexual fantasies or with use of pornography is wrong. In Matt. 5:28, Jesus said that looking at a woman in lust is committing adultery in the heart. A popular song of the sixties said "you can't go to jail for what you're thinking". Maybe not, but this teaching of Jesus states you can go to hell for what you're thinking. The command against looking at a woman in lust applies equally to women looking at men. It also applies to looking at pictures and reading pornographic materials.