The hive mind comes to the rescue! Just catching up on this thread and was nodding in agreement with all the posts as the mystery unfolded. Well done, everyone! I am glad you have restored peace to your barn, @Red_Barn !
A similar thing happened here recently. A mare who had been weaned from her foal and moved to a different stall suddenly started pacing and circling through the night, churning the shavings into dust, pulling up the mats, trashing her hay… and was hyperreactive to any sound or movement. She was not concerned about the weanling - they were stabled next to each other at first and did not fuss about being separated or going out in different pastures during the day. Her anxiety seemed to be caused by her stall time.
The BO did not want her left out at night… so I tried switching stalls around. Every stall she was in down the west side of the barn had the same result. Switched her across the aisle to the east side… and peace. My thought is that she was extremely sensitive to the yard light that is mounted outside high up on the west wall near the peak of the roof. It comes on at dusk and goes off at dawn… and it does have a sound to it that even I can hear on a quiet night - a hummmm. No other horses seem to be bothered by it at all - but this particular mare obviously has some sensitivity to it and being on the same metal wall as that light bothered her. Vibrations? Sound? Maybe both. No tingles or shocks involved - I checked everything with my electric current “pen”. But now all is well - and she will never have a west stall again.