Origin of slang words

Everyone has heard several slang words/phrases refering to masterbation, such as “spank the monkey” and “jerk the gerkin”. I do note that most of the phrases I have heard tend to refer to male masterbation (maybe it’s just funnier). Anyways, where do they come from, and how do they become commonplace?

Often euphemisms grow out of a discomfort to say the original term and to crouch it in terms that others might not find objectionable (or be totally ignorant of). It can also be an attempt to put a humorous turn to a subject that would otherwise make the speaker uncomfortable. It need not be just for selfgratification, however. We also see similar phrasing for all “private moments” such as intercourse, urination and defecation.

My favorite for masturbation is “coming unscrewed.” When cattle do it, it’s “stroganoff.”