I once had neighbours whose headboard would bang rhythmically on my bedroom wall. I did actually ask them once to pull their bed away from the wall, but it continued. It was so bad it would keep me awake at night.
I waited until they'd had a particularly late and long lasting session one night and got up extra early and put my favourite album on repeat (Swing Out Sister -remember them?) that the male neighbour had heard me playing before and mentioned that he hated on full blast and went to work.
I think they got the message because the head board banging stopped.