FORT MEADE, MARYLAND—Just after receiving a sentence of 35 years in prison for transmitting hundreds of thousands of diplomatic cables and U.S. Army reports to WikiLeaks in 2010, Bradley Manning was in a surprisingly “cheerful mood,” according to his attorney.

“He said, 'Hey, it's OK.