I had one. He was absolutely terrible in one of the 'outside' stables- one facing the yard. Then after a couple of weeks, a stable came free in one of the aisles- moved him around there and it stopped completely.
Has something changed in the routine of the horse that may have caused them to feel unsettled? Do you have any idea as to the cause of the problem?
The obvious things like making sure it always has hay, can see others and has time out in the field, getting into a routine so it is not left until last for feed or going out.
My Section D used to hate being stabled,and boxed walked terribly,thus she lived out for two years.In my current yard she has great views of the fields and seems very chilled.We give her plenty of forage,and try to keep her entertained.The only setback we had last year was that she freaked when the snow avalanched of the roof.Took me a while to resettle her.Her box walking could be traced to her weaning phase when a girl who bought her as a foal put her imn a stable and shut thee top door.