Deeeeep breath. In...out....in.....out....
Maintenance during occupancy is actually fairly common. Once, they had to install a new media center at, I believe a HP (can't remember where, but sometime in the last couple of years). I got a letter like you did indicating the work, and it stated it could take up to 2 hours, because they had to do quite a bit of wiring, hardware installation, etc. My wife and I were working from the room all day, and we let them come in and do their work -- they were very professional, and we chatted just a bit (though, most of the time we ignored each other, since we were all working), and apparently these guys are on contract with Hyatt and every couple of weeks they go to a new hotel, work room from room over a couple of weeks putting in the updated media centers. Last year, I took a cruise, I got a letter on the 3rd day that my carpet was to be replaced in my suite. I was a bit confused and unsure how they would replace an entire carpet while occupied considering not just us and our stuff, but the furniture and everything else (let alone the fact that this is a ship at sea with very tight spaces). But sometime during dinner (within a 2 hour time frame), they did it. When I got back to my room, I had fresh, brand new wall to wall carpet in my room.
I understand that you may not want interrupted, but your shock isn't warranted and you must have been quite 'lucky' to not encounter this sort of thing before. Really, a mattress change is very quick maintenance.