I have seen that there is a custom of husbands opening the ark in shul during the 9th month of pregnancy of their wives. Where does this custom come from? Is this something a man should go out of his way to do? What should one be thinking when doing this custom?
The custom is based on Chida (Moreh Be’etzba 3), and cited in Kaf Hachaim (133:12). It symbolizes the opening of the womb to allow the baby to come out, and this is the intention one should have upon opening the Ark. Some add a prayer for an easy birth at the end of Berich Shemei (sefer Refael Hamalach, Mem).
There is no obligation to follow this custom, and one does not have to go out of one’s way to do it.