Grab an eraser, then cut it down to the size of the head of your hammer. The thicker the eraser, the more cushioning you'll have. After it's been trimmed down, attach it to the head of the hammer ...
Cut larger erasers into smaller pieces for better grip and longer life. For most applications, slightly dampening the eraser will provide better results.