In 1838, he commanded the cavalry instructional establishment at Carlisle Barracks in Pennsylvania. He was assigned to Ft. Atkinson, Iowa Territory, from 1842 until 1845. He was the fort's commander during most of that period. He was promoted to major of the 2nd Dragoons on June 30, 1846. During the Mexican–American War, Sumner was brevetted for bravery at the Battle of Cerro Gordo (to lieutenant colonel). It was here that he gained the nickname "Bull Head" because of a story about a musket ball that bounced off his head during the battle. At the Molino del Rey he received the brevet rank of colonel. He was promoted to lieutenant colonel of the 1st US Dragoons on July 23, 1848. He served as the military governor of the New Mexico Territory from 1851 to 1853 and was promoted to colonel of the 1st U.S. Cavalry on March 3, 1855.