Boswell, one night sitting in the pit of Covent Garden theatre with his friend Dr. Blair, gave an extempore imitation of a cow, which the house applauded. He then ventured another imitation, but failed, whereupon the doctor advised him in future to “stick to the cow.”
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894