I imagine the animals "felt the earthquake" and fled inland to seek cover.
There were several references to the "earth trembling" from the after effects of this strong earthquake, so an animal would be much more atune to that.
Plus their sense of hearing is so much keener. Maybe they heard the wave coming...my dogs know a thunderstorm is approaching long before I do.
Don't you imagine the approaching tsunami might create "vibrations"? Like on the tracks when a train is still very distant. Perhaps animals can sense those.