I suppose masturbation means intentionally arousing yourself by stroking your penis and then usually ejaculating at the end.
According to Taoism, each part of the penis corresponds to a different organ, so be sure that when you masturbate that you touch each part of the penis (the top middle and bottom of the shaft, all sides of the tip, and the scrotum). Otherwise you may cause energy imbalances in your body.
Also, try to avoid using porn when masturbating because it causes you to disconnect from your body (leading to premature ejaculation, problems getting erect and other issues).
Be aware that ejaculating too much can drain your energy and motivation. Check out a free ebook I wrote on this topic:
Revive Your Sex Drive