Fit to be tied

What is the origin of "fit to be tied"? Context suggests it means very angry or agitated, but I would like to know its origin. Eligibility for the longarmed restraint suit used for violent mental patients?

Cassell's Dictionary of Slang says that it is mid-19th century in origin. Cassell just says that the phrase evokes someone "so hysterically furious that they need to be tied down". However, given that in the mid-19th century the straitjacket was in common use for restraining mental patients, I think it's very likely that that is indeed what the phrase is meant to imply.