Masturbation will not cause any physical problems other than possibly chafed skin.
With both that and the weight issues, I suggest you focus less on these symptoms and explore what is going on in your life more generally.
How do you use food and the masturbation? What emotional task have you assigned to them. What would you be feeling or thinking if you did not distract yourself in these ways?
I think it is likely that you will find some similar and treatable issues behind both if you get the help of a good psychotherapist.
tg