From YPPedia

When a ship finishes a sea battle, it is given the status of weary. Ships that are weary cannot be attacked until the status changes. The length of the weary time depends on several factors, including whether the ship attacked another target or was attacked by them. If you are the target of the attack, you are "weary" to everyone for 2 minutes. If you lose the fight, you are "weary" to the winner for 15 minutes.

There is one notable exception. A ship that recently lost a battle may attack the ship that attacked them. If, however, the loser was the initiator of the battle, this does not apply.