An ancient custom, which obliges any person easing himself near the highway or foot-path, on the word REVERENCE being given him by a passenger, to take off his hat with his teeth, and without moving from his station to throw it over his head, by which it frequently falls into the excrement; this was considered as a punishment for the breach of delicacy, A person refusing to obey this law, might be pushed backwards. Hence, perhaps, the term, SIR-REVERENCE.
Definition taken from The 1811 Dictionary of the Vulgar Tongue, originally by Francis Grose.
Resurrection Men * ReversedNathan Bailey's 1736 Dictionary of canting and thieving slang
John S. Farmer's collection of canting songs and slang rhymes