No, it was revealed a week in advance that he would appear on Leno. He's not doing too well in Washington so you can expect him to pop up almost anywhere these days.
I think what Obama did was incredibly clever. As only editors discuss certain issues like the economy in their columns and nobody reads them but putting him on a tv show that is watched by millions is a great way to connect with the people.