Besides the Cheshire Cat, we can also look at the March Hare illustration depicted with wisps of straw in his head. It was common practice on the stage/art to use this techniques as a symbol of madnes.I'm playing devil's advocate of course - I think we're supposed to believe that the Hatter and the March Hare are 'mad' - but recently I read something where someone pointed out that in fact there's no particular evidence for the characters being mad, other than the word of the Cheshire Cat - and I thought it was an interesting point that bore thinking about
Also and more important is Dodgson's uncle Robert W Skeffington Lutwidge who played an important part in his life (for starters he was the one who introduced him to photography)...
"Uncle Skeffington" as government commisioner for Lunacy was apointed to inspect asylums... Dodgson many times went with him to satisfied his lifelong interest in mental disorders.
So I think "mad" is used in this context... as to do with some sort of wacky "craziness" bestowed in the characters.