The operation you're describing is called a submuscular ulnar nerve transposition or SMUNT. It's one way to treat a condition called cubital tunnel syndrome (CuTS).
The elbow is opened with a long incision to expose the ulnar nerve. The nerve is released from any soft tissue binding it. Then it's moved over away from the structures pinching it.
We checked with the Naval Medical Center in San Diego where doctors have studied this particular problem. They report patients return to active duty about a month after the operations. There are some activity restrictions for several more months after that.
In a study conducted at that naval base, 19 of the active duty personnel with CuTS returned to their previous jobs after surgery. Only one patient couldn't meet the physical demands of full, active duty military status.