In spite of Bart Simpson's constant use of this catch-phrase in The Simpsons TV series, it was not Bart (or his writers) who originated it. The phrase can be traced back to the 1950s or possibly before, and it may be of American origin. Its general meaning is to "don't get so worked up." It possibly derived from a similar saying--"Don't have kittens" or "Don't have a cat." A similar variation is "have a cow," as in "Dad had a cow when he saw my report card."
Whereas The Simpsons first began in 1987, the phrase "don't have a cow" was used in the teen movie Sixteen Candles three years earlier. It was also used by Shaggy on the Scooby Doo TV cartoon. According to one source, the writer Gertrude Stein (1874-1946) used the term "to have a cow" in a sexual sense.