'of course' makes it sound obvious. It ain't so obvious - I do not see how it does any harm to anyone, so how is it immoral? Enlightend us if you would.
There is a case for it being immoral. I guess one basis would be that (for example in the case of males) when a male ejaculates during masturbation he is wasting life in that the sperm lost which hold potential for life cannot meet said potential due to their being wasted with no chance of reaching an egg. That is one case I can think of, not a particularly strong one but a case none the less.
Oh and my answer is of course no.