Terry:
A Edward Sanford is listed in Marylanders in the Confederacy serving as a private in Hampton's Legion Light Artillery. References include service records and other material.
It is possible that this Sanford is the one you are looking for. It has happened that men transfered to a nd from the army and navy
Bryan Green