I’ve really no idea about this one. The Oxford English Dictionary gives the following citations:
1873, John C. Hotten, A dictionary of modern slang, cant, and vulgar words: Devil’s bed posts, the four of clubs.
1879, Notes & Queries, 5th Series. XII, 473: I have always heard the four of clubs called the devil’s bed-post, and also that it is the worst turn-up one could have.
Eva Beate B-J suggests that it may be linked to Cartomancy (reading ordinary playing-cards instead of using Tarot cards) and the Personal Prophesy method, where the 4 of Clubs signifies misfortune, “the devil’s bedpost”. This card warns of a major setback, an unexpected set of circumstances that must be prepared for. It is also said that this card can be thought of as “Murphy’s Law” when used in readings.
On the other hand, this unfortunate connotation could have been transferred from a card game into cartomancy. Please contact the webmaster if you can contribute anything further.