I would submit that the phrase "turns up like a bed penny" must have originated around the time of the introduction of mechanical dispensing machines.
There was a time when you could walk up to a mechanical scale, deposit a penny in the slot, then step on the platform and the machine would display your weight. However, the unsophisticated mechanical apparatus that determined whether or not a realpenny had been inserted would often reject coins because of relatively minor imperfections.
This, of course, would be the one penny in your pocketful of change that would somehow continuously find its way into your grasp only to be rejected by the next machine you tried.
Hence the phrase, "turns up like a bad penny".