It is customary on Simhat Torah to conduct "Hakafot," during which we take the Torah scrolls from the ark, walk with them around the Teba (table where the Torah is read), and dance with them.
The question was asked whether it is permissible to sit during Hakafot. Normally, as the Shulhan Aruch rules (Orah Haim 282), Halacha requires one to stand when he sees a Torah scroll being transported. This is why we stand in the synagogue whenever the Torah is taken from the ark, until it is brought to its place on the Teba. We likewise stand when the Torah is transported from the Teba back to the ark. During Hakafot, the Torah scrolls are carried around for an extended period, often for 90 minutes or even more. Elderly or sick congregants may likely find it difficult to remain standing throughout the Hakafot, and the question thus arises as to whether they are allowed to sit during Hakafot, despite being in the presence of Torah scrolls being carried.
Hacham Ovadia Yosef (listen to audio recording for precise citation) rules that elderly and sick people who find it difficult to stand throughout the Hakafot may sit during the dancing. It suffices for them to stand while the Torah is being taken from and returned to the ark, and while the Torah is carried around the Teba. They may sit during the dancing after each encircling of the Teba. Hacham Ovadia emphasizes, however, that healthy people should remain standing throughout the entire period of Hakafot, even during the dancing.
If a person passes away, Heaven forbid, during Hol Ha’mo’ed Sukkot, the Shiva period of mourning begins only after Simhat Torah. In such a case, Hacham Ovadia rules (listen to audio recording for precise citation), the immediate family members may take part in the encircling of the Teba with the Torah. Although they should not take part in the festive dancing, it is permissible for them in this situation to accompany the Torah scrolls around the Teba.
Summary: Elderly or sick people who find it difficult to stand throughout the Hakafot may sit during the dancing following the encircling of the Teba. One whose immediate relative passed away, Heaven forbid, during Hol Ha’mo’ed Sukkot may take part in the encircling of the Teba, but not in the dancing.