I agree with the ulcer treatments recommended. Also, he is full of energy too, since he cannot blow off steam. Is there a reason he is not allowed in the pasture. If not, let him go back to the pasture, at least during the days. Target training in his stall can provide distraction and a calming effect as well as affirming your relationship with him. He is probably bored out of his mind with being laid up. Putting his hay in a slow feed net helps keep him busier and makes the hay last longer, helping to prevent ulcers. Is he getting grain? I would stop it. Teach him to lower his head on command, it helps to calm them. Start by putting pressure lightly on the lead rope straight down, holding a few inches from his chin. Just hold steady pressure and the second he lowers a fraction, instantly release and repeat many times. Your timing is critical, the release is super important. It must be immediate. Start with the smallest response and praise for any improvement. Sometimes it helps to give them a treat so they get it quicker, but phase them out so he isn’t just lowering his head to get a treat. It is better not to use a treat. When you see his head snap up and his neck muscles tense, ask him to lower his head. You will be surprised how it helps. The other thing is how do the people at the new barn handle him? If they are very nervous, they might be making him worse. Find out if one person is better with him and have only that person work with him until he is better. See if a new stablemate is affecting him as well – perhaps he needs a stall move. Good luck, I hope things improve! Use a long lead too, so you have extra if you need it.