Masterbation is a natural sexual activity and behaviour. It is not a problem until or unless it is uncontrollable and kind of compulsive behaviour which you are unable to control. Masterbation is considered as immoral and unethical sexual behaviour in our society which is actually not, if person does it in a controlled manner, and confirms the norms of society. If you feel that your behaviour is unethical and beyond the limit, you need to talk to your close friend or seek a professional psychologist.
Next Steps
Take counselling and try to understand your behaviour.
Health Tips
If you decide to talk to your friend regarding this, ensure that he is mature enough to talk on this topic and he is aware of different sexual behaviours. If you are not sure about your friend's maturity, take professional help.