Traditionally, you build an upstair on updown stair (it sometimes doesn't let me do it on the last updown for some reason though).
Probably (unless it's something more obscure) you need an orthogonal neighbour digging out to build
from. That can be a normal dig sideways or an up-stair to connect to a neighbouring (up-)down on Z+1. Or a ramp/etc, obviously, if that fits with what's above and you want it.
I tend to explore for caverns with up-down stacks (the first is often a crap-shoot, for each cavern except where I also find an inter-cavern revelatory connection after the first breakthrough) and
might break through exactly in the cavern wall. Unless the stairwell is going to be wider than 1x1 and I'm going to continue the neighbouring (back in solid rock) stairwell column, I tend to treat that revelatory top-of-the-cavern-wall-side as not worth recognising (while not actually diving into cavern-life, at least) and after
maybe taking steps to recover any spoil left from that dig, either designate-dump or specifically request a building of that lump, elsewhere) I will build an up'stair over the stack's penultimate depth.
As I do with mid-ceiling piercings. But I also tend to run connections between stacks at just-above-cavern-roof and just-below-cavern-floor levels (the latter awkwardly force-pausey under subterranean lakes), appropriate to my understanding of the void, so I
have side-accesses built into the capping-tile's level.
Even if it isn't one of the grander (3x3 or more) stairwells which I'm expanding out from the exploratory core once I know where to limit that particular slice of vertical corridor. Those
also give the building space (and maybe a partial-cross-section continuation of the footprint down beside the cavern, that I can keep insulated from the cavern until I'm happy.
OP: You've discovered exactly what up-stair/ramp removal and channelling-the spot-you-stand-on do. For future record, you should have not done the former but (whether or not you did) dig at least one tile (that seemed safe in other ways) to the side.
Assuming you don't need to dig more (or have dug itas an up/with a matching down on the level above) to get a building material item accessible, then Build-Construction-Upstair over the up-down should suffice (to replace the DZed up-stair, if need be, but to abstract away the down-stair opening on that tile.
Alternatives include building floors over (for solid closure whilst not needing the up-stair) or setting a bridge or hatch over the tile (handy for remote lever connection, which might appeal once you might want it switchably non-blocking). But the that's for more advanced planning than is necessary.
The miner, hopefully, will regain consciousness soon enough. If he's the only miner, then you (s)he may have to dig or otherwise engineer themselves out. I suggest a stair-down with a stair-up below (or channel for a ramp) to somewhere you can mine sideways, round a corner then into another stairwell you have/can dig to get back up around the cavern. You can set up a wall, strategically, in that escape-tunnel to block it (build it on the vertical access from the cave itself, if you'd like it to be 'floor' again, for now) or install a door/floodgate/1x1-raising-bridge if you want on-and-off accessibility control.
If you have a second miner, dig that
towards the cavern, instead, if you think you can get the first recovered/recovering themselves quicker. Either way, though, watch out for other creatures wandering in from the cavern (maybe arrange for traps/suitable-doors to be built on the inside prior to breakthrough?) and reckless web-collectors (turn-offable!) or idle explorers going cavernward with reckless abandon.
But work out your own specific plan (or at least what you
think you're going to do, then learn when it turns out that isn't what happened) out of the myriad of ways you might handle this. There's plenty of ways to play it, and most I haven't actually mentioned yet!