Charles Dudley Warner
My Summer in a Garden, 1870
Warner was a friend and neighbour of Mark Twain, and his gardening book is a gentle satire full of political asides.
the myth (William Shakespeare): Shakespeare's Trinculo says in The Tempest that "misery acquaints a man with strange bedfellows". Warner's 1870 sentence, with politics in place of misery, is the source of the modern version.
Source: Wikiquote