The act of engaging in impractical/nonproductive mental exercise / thinkings / writings / etc., through which a practitioner only comforts oneself mentally. Such acts don't lead to any constructive results what so ever in the real world; some might even imagine oneself being transformed into superman, or simply the opposite sex, etc.
In short, it's just bs/crap.
Guy1: My boyfriend went abroad so I can take over all his stuff and start anew.
Guy2: Dude, you're the same person all along; stop that mental masturbation and get the hell out of my sight.
Guy1: I think biological evolution is bull, but mankind can evolve to become God.
Guy2: Dude, you're all fucked up; you can go on with your mental masturbation, but stop bordering me anymore.