TT #51 · Parshas Tazria · Aliyah 1 · Passuk 7
English: He shall offer it before GOD and make expiation on her behalf; she shall then be pure from her flow of blood. Such are the rituals concerning a woman who bears a child, male or female.
Chabad.org — Chumash, English translation + Rashi for Vayikra 12:7
Torah Temimah cites Nedarim 35b for the inclusion of a woman who is mentally incapacitated in the law of the childbirth offering.
E-Daf — Nedarim 35b · Shas.org · Sefaria — Nedarim 35b, source text and translation
English: “This is the law of the woman who bears a child” — whether she is competent or mentally incapacitated, for a person brings an offering on behalf of his wife who is incapacitated.
Legal inclusion
The woman’s mental incapacity does not remove the childbirth-offering obligation; the passage says her husband can bring the required offering on her behalf.