Why 'as mad as a hatter'?

'Mad as a hatter' is usually used to describe extreme eccentricity. 

The phrase appears in The Clockmaker (1817) by Thomas Haliburton. Perhaps surprisingly, it is not used directly by Lewis Carroll in either Alice in Wonderland' (1865) or Through the Looking Glass (1871). 

Chapter VII of the former is, however, called A Mad Tea Party. It also  attended by a hatter, who the Cheshire Cat calls 'mad. It is the zany antics at the tea party that are being referenced in modern usage.

Mercury poisoning

The phrase is commonly believed to allude to the grim effect of mercury poisoning on workers (hatters) manufacturing felt hats. 

Mercury poisoning  affects the nervous system, with dementia a common symptom. 
Victims developed severe and uncontrollable muscular tremors and twitching limbs, called 'hatter's shakes'; other symptoms included distorted vision and confused speech. Advanced cases developed hallucinations and other psychotic symptoms. source
Daily direct contact with the metal made hat-makers particularly vulnerable to the affliction.

Mercury use progressively reduced in hat making from the 1890s. By the time it was formally banned in the US in 1941 it had been largely replaced by hydrogen peroxide.

The connection lived on the public imagination, however, largely through the popularity of Alice in Wonderland.

A real Mad Hatter?

The model for Teniell's famous illustration of Hatta is believed to be Theophilus Carter, an eccentric furniture dealer in Oxford. According to the Rev W Gordon Baillie:
All Oxford called him the Mad Hatter. He would stand at the door of his furniture shop...always with a top hat at the back of his head.
For the Great Exhibition of 1851, Carter invented an elaborate clock contraption. Its USP was that it could tip you straight out of your bed into a cold bath. 

Strangely, this enterprising product did not catch on. It is currently unavailable on Amazon. 

English Language Teaching Pack  free to download