Fire and rescue officers took an hour to free a burglar who was trapped inside the roof of a Perth business for eight hours.

The suspect, from Maddington in Perth's south allegedly broke into the premises of a garden centre in nearby Kelmscott on Tuesday night or in the early hours of Wednesday, police said.

As he was trying to leave, he slipped and the roof partially collapsed, pinning him between the roof and wall cavity.

A staff member found him at about 11am on Wednesday.

Damage to the building is estimated at about $A6000.

The man was charged with burglary, two counts of stealing and criminal damage.