The reason your horse is spinning is because he is bored, it isn’t fun for him to be stuck in a stall. Try hanging out with him and not just coming to visit him to go riding. If you do go riding don’t ride in the arena always, try riding in a field or go tail riding. If you can’t come visit him then make sure that your horse can be turned out with a couple of his horsey friends. Also if he does go in his stall make sure that he can stick his head out so that he can see what is happening around the barn.