Between you, me and the bedpost
A secret; something that only the speaker and the listener should know.
Posts, of whatever sort, have long been used to epitomise deafness and unresponsiveness; for example, Richard Braithwaite's Solemne and Joviall Disputation, 1617, compares characters as 'like Posts can neither speake nor goe'. We retain the allusion in the idiomatic phrase 'as deaf as a post'. In the 17th century posts were also called stupid; Horace Walpole made clear widespread such use in his letters in 1753:
'As stupid as a POST,' is a phrase perpetually made use of.
'Between you, me and the bedpost' has several variants - 'between you, me and the post' is a commonly found early example, but any kind of post would do. Later versions have it as 'between you, me and the gatepost', 'between you, me and the fencepost' etc, etc. The imagery of the phrase is clearly that 'this is between us two; the only other to be allowed into the confidence is deaf, blind and mute'.
The earliest version used might be expected to be the unadorned 'between you, me and the post' and that elaborations would come later. That may well be the case, but the earliest citation I have found is an example of the 'bedpost' version, in Edward Bulwer-Lytton's novel Eugene Aram, 1832:
"Between you and me and the bed-post - young master's quarrelled with old master."