My headboard is about 4 feet tall at it's highest point and is only attached to the bedframe near the bottom. This means there is quite a bit of play near the top. All I had to do was roll over in bed and the headboard would hit the wall. It has actually woken me up at night. I went to the hardware department in WalMart. Near the pads that you put under furniture to keep it from scratching the floor, I found somthing called "Bumpers." They are a small, hard, clear plastic half sphere with sticky stuff on the flat side. I attached three of them to the back of my headboard; one at each end and one in the middle. Problem solved! You can hardly see them and no more banging! Good luck.
Karen, March 2009