Joshua Webster used a cigarette lighter to activate the sprinkler after security staff locked him in a secure area while police arrived.
Leeds Crown Court heard Webster climbed on a table and held the naked flame against an alarm.
He then punched a hole in the ceiling, climbed into the ceiling void and reached a fire escape to get out of the building.
Bashir Ahmed, prosecuting, said the sprinklers caused around £58,000 worth of flood damage to the Briggate store in Leeds city centre during the incident on November 3 last year.
Spinklers were also activated at the neighbouring Yorkshire Bank. Two cash machines, each costing £10,000, were destroyed. The total value of the damage at the bank was estimated to be around £29,00.
Police arrested Webster, of The Crescent, Micklefield, five days later but he refused to comment. He pleaded guilty to theft and two offences of criminal damage.
He has 92 previous convictions for 44 offences
Ben Campbell, mitigating, said Webster had panicked and was paranoid after being locked in the room by security staff.
He added that Webster had recently been diagnosed with ADHD but was progressing well in custody after being given help to cope with the condition.
Mr Campbell said his client did not intend to cause such widespread damage by his actions.
Webster was given a 16 month sentence.
The Recorder of Leeds, judge Peter Collier, QC, said: “That was a lot of damage. I accept that your intention was to only cause a small amount of damage.”