During hostilities between the United States and Mexico, he was attached to the Home Squadron and served off Tabasco and Tuxpan on the brig USS Washington.
In the 1850s, he commanded the steamer Walker in the Gulf of Mexico on coast survey duty and invented a deep sea sounding apparatus and other hydrographic instruments.
Through the end of the American Civil War, he commanded a division off that coast; and, on June 2, 1865, took formal possession of Galveston, Texas for the Union.
After the war, Sands, appointed Commodore in July 1866, served at the Boston Navy Yard until returning to Washington, D.C. as Superintendent of the Naval Observatory.
He is the author of an autobiography titled From Reefer to Rear Admiral: Reminisces and Journal Jottings of Nearly Half a Century of Naval Life, published posthumously in 1899.