The Bhaya Bherava Sutta (MN4) states the following:
...I stayed in the sort of places that are awe-inspiring and make your hair stand on end, such as park-shrines, forest-shrines, & tree-shrines. And while I was staying there a wild animal would come, or a peacock would make a twig fall, or wind would rustle the fallen leaves. The thought would occur to me: 'Is this that fear & terror coming?' Then the thought occurred to me: 'Why do I just keep waiting for fear?
What if I, in whatever state I'm in when fear & terror come to me, were to subdue that fear & terror in that very state?' So when fear & terror came to me while I was walking back & forth, I would not stand or sit or lie down. I would keep walking back & forth until I had subdued that fear & terror. When fear & terror came to me while I was standing, I would not walk or sit or lie down. I would keep standing until I had subdued that fear & terror. When fear & terror came to me while I was sitting, I would not lie down or stand up or walk. I would keep sitting until I had subdued that fear & terror. When fear & terror came to me while I was lying down, I would not sit up or stand or walk. I would keep lying down until I had subdued that fear & terror.
However, it does not say how the Buddha subdued the fear and terror while standing, sitting, etc. How could a practitioner understand and use this method?