Fatherhood can be full of awkward moments with your son, from possible confusion over his first erection to catching him looking at pornography. But not much can compare to walking in on him masturbating.
It'll be a hard lesson to learn, but once your son hits adolescence, you should get into the habit of knocking before entering his room. Think back to when you first discovered masturbation - do you want to walk in on your son doing the same? Give a few sharp knocks and wait for a reply before you barge into the room and possibly see something you won't easily forget.
Focus on privacy
As your son approaches the ages of 11 or 12, he's going to feel the urge to masturbate - a lot. Once you're aware of his habits, you should talk to him about how it's private business and that he needs to know when it's acceptable to do it. Don't make him feel ashamed because it's a natural occurrence, but stress the importance of privacy.
Avoid scare tactics
There are numerous myths about masturbation that are wholly untrue, so don't think you can "scare" your child into not masturbating. You should give your son insight into the normalcy of what he's doing and how it's okay. This can ease the tension and make him feel better about it.