Snopes.com has an excellent article on the so-called “Twinkie defense”.
http://www.snopes.com/legal/twinkie.asp
The defendant in that case did not blame his murderous rampage on a sugar rush from eating twinkies. The idea that he did is an urban legend. However, the idea that he did use such a defense is undoubtedly the underlying metaphor in he expression Twinkie defense, which is used as a metaphor for virtually any implausible or strained legal excuse for conduct (as a metaphor, it is perhaps ironic that the defense in this case was successful). So this isn’t an example of folk etymology, but it is nonetheless folklore.
To briefly summarize, the defendant in the Milk case alleged that he was temporarily insane. He presented evidence that he suffered from severe depression as a result of his termination. His psychologist testified that a common symptom of depression is indulging in high fat and high sugar foods, and noted that the defendant had started eating such snacks. But this was not the heart of his case, and was only one piece of info that his expert relied on in support of the diagnosis of depression (the fact that he was depressed, in fact, is pretty well supported). It was only given much importance after the fact, by revisionist historians seeking to decry a verdict that seemed (and probably is) unfair.
Having said that, the Milk case seems like a rather grotesque injustice. Mental illness is not the same as “insanity” (the test for legal insanity is a segue I’ll avoid). The defendant committed a highly planned murder, which seems inconsistent, to put it mildly, with a claim of insanity, temporary or otherwise. In any event, the role played by the twinkies is not what makes this case an injustice or an absurdity.