Yes, you read that right. I ran across this gem in the book "Weird History" by John Richard Stephens, and do recommend the book.
Stephens notes the unspeakable things they were doing and saying to children and others regarding "self-love," and compares Twain to Lenny Bruce in that he used ribald humor to make a statement about society. I've procured a copy online, and share it here for your edification and enjoyment.
Some Thoughts on the Science of Onanism
A speech delivered to the Stomach Club,
a society of American writers and artists,
by Mark Twain
MY GIFTED PREDECESSOR HAS WARNED you against the "social evil --- adultery." In his able paper he exhausted that subject; he left absolutely nothing more to be said on it. But I will continue his good work in the cause of morality by cautioning you against that species of recreation called self-abuse to which I perceive you are much addicted. All great writers on health and morals, both ancient and modern, have struggled with this stately subject; this shows its dignity and importance. Some of these writers have taken one side, some the other.
Homer, in the second book of the Iliad says with fine enthusiasm, "Give me masturbation or give me death." Caesar, in his Commentaries, says, "To the lonely it is company; to the forsaken it is a friend; to the aged and to the impotent it is a benefactor. They that are penniless are yet rich, in that they still have this majestic diversion." In another place this experienced observer has said, "There are times when I prefer it to sodomy."
Robinson Crusoe says, "I cannot describe what I owe to this gentle art." Queen Elizabeth said, "It is the bulwark of virginity." Cetewayo, the Zulu hero, remarked, "A jerk in the hand is worth two in the bush." The immortal Franklin has said, "Masturbation is the best policy."
Michelangelo and all of the other old masters--"old masters," I will remark, is an abbreviation, a contraction --- have used similar language. Michelangelo said to Pope Julius II, "Self-negation is noble, self-culture beneficent, self-possession is manly, but to the truly great and inspiring soul they are poor and tame compared with self-abuse." Mr. Brown, here, in one of his latest and most graceful poems, refers to it in an eloquent line which is destined to live to the end of time--"None knows it but to love it; none name it but to praise."
Such are the utterances of the most illustrious of the masters of this renowned science, and apologists for it. The name of those who decry it and oppose it is legion; they have made strong arguments and uttered bitter speeches against it --- but there is not room to repeat them here in much detail. Brigham Young, an expert of incontestable authority, said, "As compared with the other thing, it is the difference between the lightning bug and the lightning." Solomon said, "There is nothing to recommend it but its cheapness." Galen said, "It is shameful to degrade to such bestial uses that grand limb, that formidable member, which we votaries of Science dub the Major Maxillary --- when they dub it at all --- which is seldom, It would be better to amputate the os frontis than to put it to such use."
The great statistician Smith, in his report to Parliament, says, "In my opinion, more children have been wasted in this way than any other." It cannot be denied that the high antiquity of this art entitles it to our respect; but at the same time, I think its harmfulness demands our condemnation. Mr. Darwin was grieved to feel obliged to give up his theory that the monkey was the connecting link between man and the lower animals. I think he was too hasty. The monkey is the only animal, except man, that practices this science; hence, he is our brother; there is a bond of sympathy and relationship between us. Give this ingenuous animal an audience of the proper kind and he will straightway put aside his other affairs and take a whet; and you will see by his contortions and his ecstatic expression that he takes an intelligent and human interest in his performance.
The signs of excessive indulgence in this destructive pastime are easily detectable. They are these: a disposition to eat, to drink, to smoke, to meet together convivially, to laugh, to joke and tell indelicate stories--and mainly, a yearning to paint pictures. The results of the habit are: loss of memory, loss of virility, loss of cheerfulness and loss of progeny.
Of all the various kinds of sexual intercourse, this has the least to recommend it. As an amusement, it is too fleeting; as an occupation, it is too wearing; as a public exhibition, there is no money in it. It is unsuited to the drawing room, and in the most cultured society it has long been banished from the social board. It has at last, in our day of progress and improvement, been degraded to brotherhood with flatulence. Among the best bred, these two arts are now indulged only in private --- though by consent of the whole company, when only males are present, it is still permissible, in good society, to remove the embargo on the fundamental sigh.
My illustrious predecessor has taught you that all forms of the "social evil" are bad. I would teach you that some of these forms are more to be avoided than others. So, in concluding, I say, "If you must gamble your lives sexually, don't play a lone hand too much." When you feel a revolutionary uprising in your system, get your Vendome Column down some other way --- don't jerk it down.