Myth: It is customary that the husband of an expectant mother is given the honour of pesicha (opening the ark and removing the Torah for the public readings) as a segulah (positive omen) for an easy childbirth.
Conception: Virtually all sources addressing this custom mention doing pesicha specifically during the ninth month.
The earliest source recording this custom seems to be the Chida (1724-1807), who mentions in his Avodas Hakodesh (Moreh B'etzba 3:9) that it has been the local custom [in Livorno] that husbands of expectant mother are particular to perform the mitzvah of pesicha during the ninth month. "This is a beautiful custom and has support in Kabalistic works [in the original: al derech ha'emes]."
All of this has been quoted verbatim in Chesed Li'alofim (OC 135:16) by R' Eliezer Papo (circa 1778-1820).
In his work, L'dovid Emes (2:3), the Chida mentions the same custom, attributing it to "the custom of several communities". The same custom is mentioned in his Responsa, Yosef Ometz ch. 57, with the addition that pesicha would usually be purchased by the husband.
In all these sources, the only custom mentioned is performing pesicha in the ninth month of pregnancy.
While the Chida does not explain the rationale for this custom, Rabbi Yaakov Hillel (1913-Current) in his commentary Amudei Hora'ah links this custom with the Kabalistic meaning of the ritual of pesicha, as explained in Sha'ar Hakavonos (Derush Keri'as Sefer Torah), namely the splitting of the divine attribute yesod during the birth of ze'air anpin.
The fact that this mitzva is a segulah for an easy childbirth is only mentioned in his Responsa, Yosef Ometz (ibid.). There, the Chida states that "they have said that this mitzvah is auspicious to lighten the pain of birth".
Most of these sources have been codified most recently by R' Yaakov Chaim Sofer (1870-1939) in Kaf Hachayim 134:12.
R' Shem Tov Gagin, Chief Rabbi of the Spanish and Portuguese Communities in England (circa 1934), who was a master collator of Jewish customs, mentions this custom, in his Keser Shem Tov (I:242), as a standard custom in Eretz Yisroel, adding that they would purchase pesicha throughout the entire ninth month as this is a segulah bedukah (verified positive omen) for the woman to have an easy, peaceful labour. I haven't found any other source attributing this custom to Eretz Yisroel.
One obscure source, Rafael Hamal'ach (entry meuberes) by Rabbi Yehuda Rosenberg (1860-1936) adds the following relevant detail to this custom. During the ninth month, upon removing the sefer Torah from the ark and reciting the traditional berich she'may prayer, one should add a specific request for an easy labour. He specifies the exact words of this unique addition. The same idea appears in another of his works, Keri'ah Hakedosha, a pamphlet dedicated to the laws of Torah reading (p. 8).
While I haven't found any source corroborating this idea to request for an easy labour during berich she'may, it is noteworthy to mention that many editions of the berich she'may prayer contain the following addition: "and you shall grant me male children who perform your will". Praying for an easy delivery is merely an extension of this practice. In any event, it is an established belief that the time of pesichas ha'aron (opening of the ark) is meritorious for prayer.
Rabbi Chaim Palagi (1788-1868), in Sefer Hachayim (1:5), a prolific author who wrote 72 books on all topics of Jewish life, addresses the behavior of some individuals to open the ark during the ninth month of pregnancy but avoid closing it. He suggests that this custom is meaningless on two accounts. Firstly, as a sign of respect for the sefer Torah, it is appropriate that upon removing the sefer Torah the ark should be closed. In addition, the positive omen of opening the ark for an easy opening of the womb should be extended to the closing of the ark, so that her womb will be closed appropriately.
All of the above mentioned sources are clearly referring to the ninth month. There is one exception however to the rule. In the pamphlet Birchas Ephrayim (§ 60), which consists of the will and testament of Rabbi Ephraim Segal of K'wil, Poland, we find the following: "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 honour 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".
This record of the custom mentions several novel facts: that the custom begins from the seventh month onwards; that it is to be performed specifically during the recitation of An'im zemiros and that this custom dates back to the Rashba. Assuming that "the Rashba" is a reference to Rabbi Shlomo ben Aderes (1235-1310), this would be, the only record, as far as I know, of such a tradition in the name of the Rashba. None of the other sources enumerated earlier mention the Rashba in this regard, nor do they place this custom at such an early stage in pregnancy.
It is likely that that the words "the seventh month" is an error and should really read "the ninth month". Be that as it may, the corpus of rabbinic literature formally records this custom as one to be performed in the ninth month. The only exception is found in a personal and private will of one father to his own children.
Having addressed the timing of this custom, we now turn to another aspect, the secrecy of this custom. The Lubavitcher Rebbe mentions this custom in three different letters (Igros Kodesh V:327. VI:27. VII:108) advising husbands of the appropriate mode of conduct during pregnancy. While the specification of the ninth month is found in one of these letters only, in each of these letters he stipulates that this custom be performed "b'li b'litos" , loosely translated as "without making a show of this". Rabbi Leibel Groner, secretary of the Rebbe, relates that he was aware of many incidents where this directive - "b'li b'litos" - was given in this regard. This probably means that if someone else is sent to do it, one should not suddenly call out to stop them as this would be causing a scene.
Rabbi Gavriel Zinner has suggested in the Journal, He'oros U'biurim (# 879 p. 72) that this is associated with the general code of not publicising pregnancies. In the following journal (#880), Rabbi Sholom Ber Chaikin questions this interpretation, as this custom is performed during the ninth month, where the code of not publicising pregnancies no longer exists.
It is possible that the emphasis on "b'li b'litos" stems from a different rationale - so as not to formalise this as an official custom.
This approach seems to be supported by the fact that the formal collection of Chabad customs during pregnancy, Kovetz Minhagei Chabad B'inyanei Heroyon V'leida (Kehos, 5752) omits completely any reference to this custom, despite its appearance in some of the Rebbe's letters. According to the author, Rabbi Avraham Holtzberg, interviewed in He'oros U'biurim (# 636 & # 878), he enquired of the Rebbe whether this was a custom for the entire pregnancy or from the ninth month onwards. He also enquired whether this was a public directive or personal advice to specific individuals. The Rebbe responded by deleting this "custom" completely from his collection with an X. Alternatively, the deletion of this custom was to support this notion of "b'li b'litos", because listing it as a custom makes a scene out of it - it should be done without making a big deal of it.
It is quite telling that the bulk of letters of the Rebbe addressing pregnancy make no mention of this custom. This glaring omission seems to support the view that this directive applies only to specific situations.
Whether this custom should be performed as a matter of course in all pregnancies can be debated. The Rebbe's view seems to be that this is not necessarily the case, or at the very least that it should be performed subtly. However the following "custom" certainly may be implemented and should be implemented formally in all pregnancies: the conduct of the parents during pregnancy affects the child. Consequently, the custom of righteous men and women is that during the time of their pregnancy they increase the care with which they attends to matters of Torah and mitzvos, for the benefit of the child.
 See the contemporary work, Shiras Moshe (Sivan 5762) by Rabbi Yisroel Moshe Hager p. 24, who suggests an alternative rationale for this custom.
Responsa Ohel Yisachar (ch. 88) addresses the issue whether this custom should be observed in a case where the women can't have a natural delivery and has scheduled a cesarean section. He concludes in the affirmative.
 The words of Yosef Ometz have been slightly misquoted in the contemporary Otzar Taamei Haminhagim where he suggests that "in the merit of this mitzvah, the birth pangs will be lighter and her womb will be opened in the appropriate time".
 The idea of this custom originating in Eretz Yisroel has since featured in other works as well, such as Siddur Ha'geonim V'hamekubalim by Rabbi Moshe Yair Weinstock. Shiras Moshe (p. 24) by Rabbi Yisroel Moshe Hager goes so far as quoting this custom in the name of sefer Minhagei Eretz Yisroel. As far as I know, no book bearing such a title (there are several books with this name...) makes mention of this custom. As both of these sources use Gagin's words verbatim, it is abundantly clear that they have taken their information from Gagin, but preferred to withhold their sources for various reasons.
Regarding the censorship of Gagin's works, see the publisher's notice in the 1998 edition of his works.
 Rabbi Rosenberg has long been accused of forgery and of fabrication of stories and ideas. See, for example, Or Yisroel Tishrei 5769. See also,
The Lubavitcher Rebbe didn't wish to take a position on the authenticity of Rosenberg's writings, see Hiskashrus # 216 http://chabad-il.org/hit/hit216.htm#4
 Research about the correct text of the berich shemay prayer is beyond the scope of this article. More information on this matter can be found in Kovetz Yeshurun pp. 576-580.
 See Zohar Vayakhel 206b. Avodas Hakodesh (Moreh B'etzba 3:90). Or Hayoshor (Papiras, Laws of Sefer Torah, 10:2) and a host of other sources. Likutei Dibburim II:226a.
 A related topic is the common custom to honour the same individual with both the removal of the sefer Torah and returning the sefer Torah. While this custom is widespread, suffice it to say that this is a matter of dispute. This is, obviously, beyond the scope of this article.
 This pamphlet is printed as an addendum to Pischei Sh'earim, Talmudic novellae by Rabbi Yisachar of Tchenstechow (Bilgurei 5660).
 A medieval rabbi who is widely known as the Rashba, the Hebrew acronym of his name: Rabbi Shlomo ben Aderes.
 This would assist also in dating the dissemination of the custom to recite this liturgy.
 The omission of this detail in the other two letters is not necessarily telling. As these letters are responses to real situations, it is highly plausible that in the other letters the enquirer mentioned the fact that the woman was about to enter the ninth month and hence there was no need to stipulate that the performance of this custom begins only during the ninth month.
 Recorded in He'oros U'biurim (# 879 p. 72)
 More details about this code of conduct can be found in other letters of the Rebbe in Igros Kodesh, as well as in other works.
 One of the members of the Rebbe's secretariat claims (Hiskashrus # 359) to have specific knowledge that this instruction was given only in specific circumstances to specific people.
 See sources cited in Otzar Habris 3:7. Sicha of 19 Kislev 5747 (Hisvaadiyos 5747, Vol. 2, p. 37).