Smoking is definitely a bad habit. It has ill effects over your health. So definitely you need to stop it.
Alcohol: better to stop completely. If you are too much addicted to it, then you can have in very small amount occasionally. But avoid it for a month after surgery.
Your stomach is swollen? If you are not passing proper motion, then drink more water and can have syrup. Cremaffin 20ml only in night for one month. That will get better. Masturbation is unrelated to this surgery. That's completely a personal act for your sexual desire. There I no problem in doing masturbation. If you are planning actual sexual intercourse, that aggressive body movement is to be avoided for 6-8 weeks till the stitches heal completely.
Food: high fibre diet, plenty of liquids, avoid hotel food, avoid packed/preserved tinned items.
Next Steps
High fibre home made food as mentioned above.