Why the Soviet Union collapsed under the leadership of Mikhail Gorbachev

Why the Soviet Union collapsed under the leadership of Mikhail Gorbachev rather than during the stagnant and corrupt era of Leonid Brezhnev? Explain