How postural imbalance can affect piriformis
The Piriformis is attached at the back of the thigh bone and if the center of the body leans forward due to a weak core/hip (1st image), the thigh bone leans forward too. Then, the piriformis muscle gets tense unnecessarily.
In addition, the glutes cannot function properly in this position (See the below video from 03:55). As a result, the deeper layer of the hip muscles, including the piriformis, have to compensate, often leading to overload on such muscles and subsequent problems.
The second body feature is that the center of gravity is tilted to one side, as shown in the picture above. In the case of this woman, her weight is shifted to the right, and in this case, her right gluteus medius (side hip) and piriformis muscles are placed in a lengthened position. This naturally weakens muscle function and overloads the muscles.
On the other hand, the left gluteus medius can be placed in a shortened position. Consequently, the muscles gradually become tight, which will decrease its function as well. Therefore, whether the muscles are shortened or lengthened, muscles that are out of their neutral position do not function properly and are more likely to cause problems.
Finally, the third physical feature that can put stress on the piriformis is pelvic rotation (3rd image). This man's pelvis tends to rotate to the right when he is completely relaxed. Now the left side of his pelvis moves forward and the right side relatively moves backwards.
If this happens, the right piriformis is likely to be placed in a lengthened position, while the left piriformis muscle is placed in a relatively shorter position. This again can lead to overload on both sides and hence cause piriformis problems.
Having these body characteristics does not necessarily mean that it always causes a problem, but consider this as a contributing factor and make sure to do a program that balances your whole body.