What is the origin of the practice of giving “pesicho” (the honor of opening the Ark) to the husband whose wife is expecting a baby?
In the back of the Chumash Shai LeMorah, a list and hierarchy of the the people who are obligated to receive an Aliyah to the Torah. He adds parenthetically as follows:
It is written in the Sefer Avodat Hakodesh of the Chida Z"l that there is a custom in Eretz Yisroel that someone whose wife enters her 9th month of pregnancy should be careful to do the Mitzvah of Opening the Ark. This is a nice custom and has Kabbalistic support.
Here is a link to the Chida (Mareh B'Etzbah 3:90).
From an article "Pesicha During Pregnancy", by Rabbi Yossi Braun:
The Birchas Ephraim 60 (This is a pamphlet that is printed as an addendum to Pischei Sh'earim, Talmudic novellae by Rabbi Yisachar of Tchenstechow - Bilgurei 5660). says as follows: "My children, do not forget to introduce the tradition from our master, the Rashba, in whose name I have found recorded, that one should accustom himself that when his wife is pregnant he take the honor of opening the ark from the seventh month onwards during the recitation of the liturgical poem An'im zemiros. At this stage he should recite a prayer in accordance with what G-d will place in his mouth".
Based on this the custom dates back to the 13th century - although it is only mentioned for Anim Zemiros.