A simple pendulum hanging freely and at rest is vertical because in that position
K.E is zero
K.E. minimum
P.E is zero
P.E. minimum
stable position is obtained when potential energy is minimum
lesser P.E, higher stability