Rat infestations may have been a nightmare for convicts at Sydney's Hyde Park Barracks in the 1800s, but today historians are grateful for the rodents.

Scuttering beneath the floorboards, the rats hoarded scraps of fabric, food and personal treasures.

Researchers joke that these rats inadvertently became the barracks' first curators.

The material looked like big piles of dusty, dirty rubbish when it was discovered in 1979, but archaeologists were thrilled upon closer inspection.

"It turns out the accumulated rat nests contained more than 80,000 archaeological artefacts that had been trapped under the floorboards and undisturbed for up to 160 years," said Beth Hise from Sydney Living Museums.

"This treasure would never have survived without them."

Beth Hise from Sydney Living Museums hopes the exhibitions will breathe new life into history. ( Supplied: Sydney Living Museums )

The material contained intimate objects that don't usually survive in an archaeological deposit — scraps of convict uniform, pieces from women's clothing and pages from prayer books.

The story of the rats will be integrated into a new exhibition experience at Hyde Park Barracks, opening on February 21.

The UNESCO heritage-listed barracks have been closed since January 2019 to undergo an $18 million refurbishment.

Cleaned and conserved fabric scraps from the Hyde Park Barracks underfloor deposits ( Supplied: Sydney Living Museums )

Visitors to Hyde Park Barracks will be met with a challenge: to locate the 14 mummified rat carcasses displayed across the three storeys of the building.

An interactive audio tour will allow museumgoers to immerse themselves in the stories of convicts and immigrants as they search.

Guests will hear the account of convict Joseph Lingard, who describes how rats plagued the barracks in the 19th century.

"[They] came by hundreds; they even came into the bed, crept-in at our breast ... like a pack of hounds," he recounts.

Nest as discovered under the floorboards at Hyde Park Barracks in the early 1980s ( Supplied: Sydney Living Museums )

In the background of the recording, visitors will hear what sounds like rats scurrying in the walls.

"It's quite convincing, it's a little bit unnerving. The little secret there is our sound designer who's based in San Francisco actually recorded his daughter's pet rat," said Ms Hise.