From "Crime and Punishment in the Civil War by Robert Bateman:
...Then there was "bucking and gagging." Here the soldier would be forced to sit in the dirt and bring his knees up to his chest while his hands were brought around to the front where they were tied to his shins. Then they would take a stick or a rod and shove it over his arms but under his knees, gag him, and leave him there, often for hours. http://www.esquire.com/news-politics/news/a25915/punishment-and-torture-in-the-civil-war-111413/
In the novel "Arise from the Dust" after being enlisted in the Union Army against his will, Myscal Taylor tries to escape the training camp. He is caught and punished by a more extreme version of "bucking and gagging":
...Myscal felt shaken to see the entire camp assembled, waiting. They stood in a U-shaped formation with Lt. Coleman at the open portion of the assembly. The two soldiers hauled him staggering in front of the lieutenant. He stood unsteadily, swaying on his trembling legs. Coleman watched him for a moment then turned with a dramatic flourish to address the formation.
"Men,” he piped up in his high-pitched voice, “We have a deserter here. Private Taylor decided to skedaddle on his oath to the Union. While he may not be fit for a soldier, he is fit enough for camp punishment. I want all you men to witness first-hand what happens to recruits who fail to honor their enlistment oath. We could either hang or shoot Private Taylor for his misdeeds, but I have decided to give him mercy in the hopes that he will mend his ways and turn his body and soul to serving the Union as you men do. He has the next 24 hours of punishment to think about his duty."
Turning to the two men holding Myscal, he ordered, "Gag and buck the deserter!"
A stick with rough bark was roughly inserted between his teeth. A strip of cloth looped around the back of his head to tie off the stick ends. The stick forced his jaws open and compressed his tongue. The stick tasted of turpentine and moldy straw. Myscal was now gagged precisely as a horse forced to take a cruel iron bit.
The guards now pushed him down into a sitting position, pulled his arms behind his back. A much longer stick was positioned in the crook of his elbows behind his back. The stick was secured across his back by tying both elbows to the protruding stick. Tightly, but not enough to act as a tourniquet. The effect left him trussed, unable to move his arms. The stick pressed severely on his back and across the front of his elbows. Myscal felt his muscles and joints strain from the force of the stick pressuring his biceps and upper vertebrate. Rough hands then drew up his knees while he sat flat on the ground feeling the bite of the stick across his back. Another long, rough stick was placed behind the hollow of his knees. The soldiers forced his heels nearly back to his buttocks, then secured the thick stick with more cloth strips so he could not straighten or flex his knees. The stick exerted a stabbing pressure on delicate pressure points behind each knee. Now he was bucked.
Myscal could not move. He could not stand, could not roll over on his side due to the length of the two sticks behind his elbows and knees. He sagged against the tilted ends of the sticks resembling a lop-sided wooden top which had ceased its spins.
Glancing up, Myscal saw some men in the formation openly smirking. He had learned that life at the hard edge of the frontier revealed men’s souls. This camp had the same hard blade. Some recruits here plainly enjoyed the misery of others. Whether inflicting or spectating—it was the same. A few recruits looked on with indifference. Most looked away, uneasy at the brutality of the punishment.
Coleman resumed command of the formation. "Sergeants, take charge of your men, dismiss them to their duties for the morning."
The sergeants called their individual squads to attention, dismissed them. The Camp rapidly returned to its normal routine of drill and fatigue duties.
The sergeants called their individual squads to attention, dismissed them. The Camp rapidly returned to its normal routine of drill and fatigue duties. Commands bellowed across the parade ground, recruits made mistakes, sergeants and corporals shouted at the stupid, careless, and torpid. The sun shone bright, the morning air continued its crisp autumn nip. A light wind blew through the camp mixing the odor of the reeking latrine trenches with the smoke of cook fires.
The first fifteen minutes of the bucking and gagging pulled on Myscal's muscles and joints to where they felt they would fray like too-stretched ropes. They soon radiated sensations of fire-hot burning. He felt dizzy, his head lolled back loosely on its slender stalk of spine.
The next quarter hour transitioned from burning sensations to sharp, stabbing pain. Within a half hour, the pain changed its intensity to jaw-clenching, molar-grinding agony....
Joseph Taylor: Mormon Battalion, Donner Party, Utah War Militia Officer