Were they immediately taken back and sent to patrol Western territories, stationed elsewhere to keep peace during Reconstruction, or did most just quit Army life for good?
There was a Straight Dope question a couple years about this, and there doesn't seem to be much of an answer for enlisted soldiers. However, Gen. Joseph Wheeler went on to join the U.S. Army and fight in the Spanish-American war.
Although it doesn't mention what happened after the war, this article from the National Archives describes how some Confederate POWs swore an oath of allegiance to the Union and fought for the U.S. Army in the Dakota territory in 1864.
edit: National Archives and year