I just had a new roof put on last month.
The roofers had an opening almost immediately, so I didn't have time to relocate the rabbits to the basement or to buy a large table for their room for them to hid under (I figured the pounding would resonate through the whole house, so maybe additional shelter would work as well as moving them). My rabbits have a room on the second floor... right underneath the roof.
Honestly, I don't know how they handled it. The roof only took one work day, but I'm sure it was stressful for them. They have places to run & hide in their room, and have each other for comfort... they were a bit stressed when I got home from work, but they seemed to be mostly over it by bedtime. I think they just hid in a box or hutch while it was happening. (They probably thought the world was ending!)
If you have an extra bed, or something thick & heavy that can insulate sound, perhaps that would work. It would provide security of a tight space while muffling the pounding somewhat.