Music that has no emotion or musical value and is created to embody and amplify the characteristics of a certain style.
In other words, music that puts technicality, brutality, speed, and complication over the quality and the emotion put into the music.
A Power Metal band that musically masturbates will fit as many notes as possible into their riffs and solos. Resulting in a boring rushed song.
A Tech Death band that musically masturbates will also fit as many notes as possible into their riffs, and they will usually palm mute the whole thing and make the riff as hard to play as they can. The drummer will hit the bass drum with a double bass pedal as fast as they can. Resulting in crap.
A Prog Metal band that musically masturbates will create songs as long as possible with as many different riffs as they can make. Often creating boring songs.
The guitar work of some shredders has been labeled as musical masturbation.