Is it safe to re-use old spokes when re-lacing?
Generally yes. As Daniel points out, spokes wear and if you have a good number of miles on the wheels it's a good idea to replace if you have to rebuild.

A 3x build like you mention will have wear at the crossings as well as at the hub flange and at the rim. If you reuse you will be adjusting these wear points slightly, but only by a very small fraction and I would guess that the end result would be a higher chance of spoke failure.

Also, unless you are replacing with an identical hub, the dimensions will likely be different and will probably require a different length spoke.

Happy Riding.