Yup, this is one of Kirbys spikes.
I was a bit surprised too when I pulled it off for the first time in ssbb. I was vsing my friend, Kirby vs metaknight (respectively) and he managed to hit me vertically far enough that I would cut it close on my approach back to the stage. So he decided to edgehog me and I decided to up B. Luckily (and unknown to me), on the way down from the up b, i was able to spike him and kirby automatically edgehogged. So this seems feasible either way, on stage or trying to recover, but the latter will usually be determined by your opponents knowledge of Kirbys moves rather than your ability to pull it off.
Correct me if I'm wrong but I do believe in the original ssb on the n64, Kirby was able to spike as long as he connected with the up-b on the way up as oppose to melee/brawl in which if u wished to spike, u would have to connect on the way down only.