E. Cobham Brewer 18101897. Dictionary of Phrase and Fable. 1898.
In the twinkling of a bed-post. As quickly as possible. In the ancient bed-frames movable staves were laid as we now lay iron laths; there were also staves in the two sides of the bedstead for keeping the bed-clothes from rolling off; and in some cases a staff was used to beat the bed and clean it. In the reign of Edward I., Sir John Chichester had a mock skirmish with his servant (Sir John with his rapier and the servant with the bed-staff), in which the servant was accidentally killed. Wright, in his Domestic Manners, shows us a chambermaid of the seventeenth century using a bed-staff to beat up the bedding. Twinkling means a rapid twist or turn. (Old French, guincher: Welsh, gwing, gwingaw, our wriggle.)
Ill do it instantly, in the twinkling of a bed-staff.Shadwell: Virtuoso, 1676.
He would have cut him down in the twinkling of a bed-post.Rabelais, done into English.
Bobadil, in Every Man in his Humour,
and Lord Duberley, in the Heir-at-Law, use the same expression.