This expression was in common use in the
British Royal
Navy, certainly in the eighteenth century, but is probably even earlier than this. As these ships were built of
wood and powered by sail, emphasis was given to fire power and hull design and as a result
crew accommodation and food storage were extremely primitive. This meant that foodstuffs were subject to attack and contamination by the numerous rats living on them. When this happened, the food or other stores, such as sails or ropes that had been destroyed by rats or so contaminated by them as to be totally unusable, would be described as having '
gone to rat shit'.
The expression became more widespread due to its use within the Royal Dockyards and still later within civilian establishments. Its meaning also began to change and expand so that it came to
mean anything that had become
broken, damaged or
useless for any reason not just rat attack. It also began to be applied to people where it meant someone who had changed from being pleasant and personable to unpleasant and disagreeable. It is also applied to someone whose health is failing, affecting their appearance.