For some sixty years readers of Ulysses had come to accept “Mighty cheese” as Bloom’s comment on the digestive powers of cheese. Hans Walter Gabler's Critical and Synoptic Edition of 1984, however, following the evidence of 1921 typescript overlay eventually reinstated what one reviewer of the Critical Edition (Clement Semmler) called “one of Joyce's best puns”. (Darantiere's chief printer, Maurice Hirschwald, had probably regarded the rare adjective mity “full of mites, infested with mites” as an error and changed it to mighty.) But we can be confident that neither Bloom nor Joyce would have claimed authorship for this pun, as it had been around in print for at least half a century before Bloom used it on 16 June, 1904:
It is a common fancy among medical men, and a common whim among the people, that old, strong, rank cheese, though itself very indigestible, stimulates the stomach to digest other things; hence almost all the medico-dietetical works works quote the old adage:
'Cheese is a mity elf,
Digesting all things but itself.'
Russell Thacher Trall, The new hydropathic cook-book: with recipes for cooking on hygienic principles (1854) p. 107
As Dr Trall emphasizes, this was an old adage even then. The variant “Cheese is a peevish elf ...” can be traced back to the second edition of John Ray's Collection of English proverbs of 1678. Ray regards it as “a translation of that old rhyming Latin verse, Caseus est nequam quia digerit omnia sequam”.
It seems worth mentioning, though, that the printer’s alleged correction was less arbitrary than it might at a first glance seem. Not only was “mighty cheese” a not uncommon collocation, but the quoted adage found its way into print with “Cheese is a mighty elf” as early as 1868 in John Norton Loughborough's Hand book of health.
There can be little doubt, however, that Bloom and his creator savoured and favoured the less appetizing variant.