Green’s Dictionary of Slang

cousin tom n.

also cousin tommy
[SE cousin + Tom of Bedlam n.]

a madman, esp. a beggar, tramp or similar person.

[UK]W. Carr Dialect of Craven I 89: Cousin Tommy is applied to a man in that melancholy [deranged] situation.
[UK]Partridge DSUE (1984) 259/2: cousin Tom. A half-witted man: in C.18 if [sic] a beggar, in C.19 of any unfortunate, though not applied to a person of standing.