In the 18th and 19th centuries, the Western world worked itself up into a mass hissy fit over the idea of people touching themselves. Judeo-Christian tradition had already been damning masturbation as a misuse of sexuality for ages, but Victorian era prudishness and the Great Awakening and other religious revivals in America created a perfect storm for people to really get obsessed with it.
Books like the anonymously authored Ononia: Or the Heinous Sin of Self-Pollution, and all its Frightful Consequences... and Samuel Tissot's Treatise on the Diseases Produced by Onanism [masturbation] laid the groundwork for medicalizing “the solitary vice.” Soon, masturbation was no longer just a moral failing, but also a physical and mental ailment that required treatment and cures.
In the young United States, one of the most ardent anti-masturbaters was a Michigan physician named John Harvey Kellogg. The good doctor was a bit uncomfortable about sex, thinking it detrimental to physical, emotional and spiritual well-being. He personally abstained from it, and never consummated his marriage (and may have actually spent his honeymoon working on one of his anti-sex books). He and his wife kept separate bedrooms and adopted all of their children.
Kellogg’s solution to all this suffering was a healthy diet. He thought that meat and certain flavorful or seasoned foods increased sexual desire, and that plainer food, especially cereals and nuts, could curb it. While working as the superintendent at Michigan’s Battle Creek Sanitarium, he hit upon a few different healthy eating ideas. Two became breakfast staples and one (thankfully) didn’t.