Fire officials said the man living inside the apartment was pulling some wires wrapped around the sprinkler, causing it to break and the alarm to go off.
When firefighters arrived at 12:20 a.m. Thursday, they found a hydroponic grow operation in a back room. The broken sprinkler caused flooding inside the apartment building and the building's parking garage.
Police said the man in the apartment was arrested and booked for investigation of marijuana possession and cultivation with intent to distribute. His identity was not immediately released.
The Associated Press contributed to this report.