Well, If you're a layperson there's no rule against it. Plain and simple. The Buddha never made a rule prohibiting the lay person observing the 5 precepts from engaging in masturbation.
From a Dhamma perspective: The process of masturbation and sex relys upon desire, specficially sensual desire.
What is said about sensual pleasures?
From my understanding it is that partaking in sensuality, reinforces sensuality in the future.
To cut it short: It's habit forming, and that habit won't make you happy.
The drawbacks of sensuality are that it binds us to the sensual world, it causes attachment. Craving for sensuality is one of the things that binds one to the wheel of suffering. Furthermore, the pleasure gained from masturbation, or any sensuality for that matter - Is fleeting, inconstant, it is only for a brief time. Why partake in something that offers you only brief pleasure, when far greater happiness awaits, practising the Noble Eightfold Path.
Here is the index of Sutta's relating to this topic:http://www.accesstoinsight.org/index-su ... sensuality
The sutta's would much better elucidate what I am attempting to convey to you. I also hope you can forgive me for being such a hypocrite. It's one thing to see the truth (however dusty my eyes are), it's another to practise it. I have to admit; I am just as bound to sensuality as the next man. From it, I can say one thing though - It's caused me much more grief than pleasure...
"For a disciple who has conviction in the Teacher's message & lives to penetrate it, what accords with the Dhamma is this:
'The Blessed One is the Teacher, I am a disciple. He is the one who knows, not I." -