Mad as a hatter is in reference to "Hatters" becoming mad in old age. When hats were made out of felt, long term mercury exposure was a major problem for some in the trade. They used Mercury to help press the felt. Years of daily exposure to mercury cause it to be absorbed into the body with mental dementia or other mental problems as the result. The "hatters" were the men using mercury to press the felt not the makers or sellers of hats.

If you do a search of the term "night silver" you will find another use of mercury. Taken just before bed time it had the ability to unblock even the worse constipation. You would then take your stool to the Druggist/Chemist/Apothecary and they would recover the mercury for the next person to use. HMO's before its time.