If after doing this you closed the image, then you can't "Undo" the action.
If you left it open, I imagine Undo/Ctl/Cmd-Z would likely work, but I'm not positive of that. You'd have to try and see.
As to re-opening the jpeg, you can in fact Save As a psd (or tiff) so that you can edit it, Save, re-open and re-edit. For one thing you can keep layers intact for future edits, and also doing that will prevent repeated jpeg compression, a good thing!
When I was shooting jpegs, that became my "normal" process when I needed to do work in Photoshop. At the time, psd was the "normal" format, and as soon as I opened a jpeg in Photoshop I'd do the Save As to a psd, and leave it in that format until I was ready for a final output.