Well, moving the piano can cause it to get slightly out of tune, I'm not sure if the earthquake would do the same. If the piano topples over, there is a risk that something might hit the soundboard, completely modifying the sound of it (if it cracks). It also depends on how sturdy the piano is. My grandmother's old German piano (from the early 1900's probably) fell from the truck straight to the floor on its wheels, jumping from about 3 feet and a half of height. My grandmother started screaming at the movers, but incredibly, the piano was intact. I'm not sure what it would do to a Yamaha though...

I would ask a piano technician before modifying the piano in any way, because the upper back of the upright piano is actually the piece of the pinblock, which supports a very heavy tension from the pins and strings. Maybe if you turn it on its back and lock the lid to the keyboard, then putting a blanket on it, it could be safe, if you are suspicious of any earthquakes. I hope this was helpful. And I send my best wishes and good luck against any earthquakes.
Sincerely,
Mario Barbosa.