"a long, rambling discourse; incoherent harangue," 1736, apparently from an altered, Kentish colloquial survival of ragman roll "long list, roster, or catalogue" (c. 1500). The origins of this are in Middle English rageman "document recording accusations or offenses," also "an accuser" (late 13c.). For this, Middle English Compendium compares Old Norse rogs-maðr "a slanderer," from older *vrogs-mannr. With folk-etymology alterations along the way.
By late 14c. rageman was the name of a game involving a long roll of verses, each descriptive of personal character or appearance. In Anglo-French c. 1300 Ragemon le bon, "Ragemon the good," is the heading on one set of verses, suggesting a characterization. The sense was transferred to "foolish activity or commotion" generally by 1939.