That’s the rumor but historically it’s not really true.
The creation of corn flakes was part of J.H. Kellogg’s broader advocacy for a plain, bland diet. Without referring to corn flakes in particular, Kellogg elsewhere recommended a plain, bland diet as one of several methods to discourage masturbation.
According to the available evidence, corn flakes were primarily created as an easy-to-digest, pre-prepared and healthy breakfast food, in particular for patients at the Kellogg sanitarium in Michigan. The product was never advertised as an “anti-masturbatory morning meal.”
That’s the rumor but historically it’s not really true.
Quoting Snopes