Rats on board old time ships (and probably modern ones too) were normally found in the lowest decks of the vessel.When a ship began to sink and those lower levels became flooded, the rats - quite naturally - would climb up to the upper decks - possibly giving the first signal to the crew that the ship WAS sinking. But if the ship was at sea, I'm not sure about the rats actually leaving the ship, before they absolutely had to - which would be more or less at the same time as the crew. It occurs to me, however, that once the rats were on the upper decks, with lots of people and acitivity around, they might jump overboard, more to get away from the people, than because the ship was sinking.