Players can bounce on beds even if they don't directly touch the bed's surface. This can be tested by placing a trapdoor above the bed and jumping on the trapdoor; the player will be bounced back up as if he jumped on the bed, not the trapdoor.
Bouncing on block beside bed
bug with a bed
Carpet on bed wierd
Whether or not a player experiences some effect is calculated based on the block under the center of the player