The GPLv2 had some advice on the subject:
You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright
interest in the program `Gnomovision'
(which makes passes at compilers) written
by James Hacker.
signature of Ty Coon, 1 April 1989
Ty Coon, President of Vice
That said, since your employer paid you to write this code, it is likely that they intend to use it, and they therefore may not be happy to assign the copyright to you. If this is so, your employer can also choose to publish it under the free licence of their choice, which means you can then copy it, host it yourself, fork it, and so on.
If that's the path they take, then although it'd be ideal if they put in all the (say) GPL headers, added a copy of the GPL, put it all up on a website, and so on, all they really need to do is give you a copy and make clear that the conveyance is subject to the licence in question, perhaps by giving you a copy of the complete tarball along with a letter that says
Yoyodyne Inc. conveys this copy of the program "Gnomovision" to James Hacker under the terms of the GNU GPL, version 3 (or at his choice, any later version).
Ty Coon, President of Vice
The advantage of the latter route is that your employer remains free to commercially exploit the code they paid you to write; you, meanwhile, get a copy that you can use freely, and which will (if they pick a copyleft licence) remain free for others to use.