Well, on the positive side, masturbation can be a form of stress relief. It can help release endorphins which make you feel good. For some people, it's a way to explore their own bodies and sexual preferences in a safe and private way. However, if it becomes excessive and starts to interfere with daily life, like making you miss important events or neglect relationships, then it can have a negative impact on mental health. Also, in some cultures, there may be a sense of guilt associated with it, which can cause unnecessary stress if one adheres to those beliefs.
Masturbation generally has a neutral to positive impact on mental health. It can be a healthy outlet for sexual energy. For example, if someone doesn't have a sexual partner, it can still fulfill some of their sexual needs. But in terms of negative impacts, if someone has been taught that it's a 'bad' or 'dirty' thing, it can lead to feelings of shame and anxiety. These negative feelings can potentially affect mental well - being if not addressed.