Fire crews have been praised for preventing what could have been a “major disaster” after a man jumped from a burning unit complex.