The commentators ask from our forefather Yaakov: Cohabiting with Leah on their wedding night should have been forbidden based upon our Gemora? Firstly, Yaakov thought that she was Rachel! Our Gemora states that a union with a woman who was mistaken for another can produce degenerate children! Secondly, the Torah describes Leah as being hated. How then could Yaakov cohabit with her? Furthermore, the Ramban cites a Medrash that Yaakov hated Leah for colluding with her father and for not informing him who she truly was on her wedding night. The Medrash states: Once Yaakov saw that Leah tricked her sister, he resolved to divorce her. This is what Leah was alluding to when she called her second son, Shimon. Why was Yaakov permitted to be intimate with her under such circumstances?
There are several answers on these questions. The Ra’avad says that during the act of intimacy, Yaakov was at peace with Leah and did not harbor any ill feelings towards her.
The Beis Yosef answers that Leah was not as “well liked” by Yaakov as Rachel was, but she was not actually hated.
The Ra’avad continues that in truth, these prohibitions were only applicable after the Torah was given; they did not apply to Yaakov (in a similar vein; that is how some explain the fact that Yaakov married two sisters).
The Magen Avraham writes that Yaakov actually realized that it was Leah when she entered the chupah. Hence, at the time of cohabitation, he did not mistake her for Rachel.
The Alshich explains that the Gates of Heaven accepted the tears of Leah and caused Yaakov to never even realize that he was cohabiting with Leah (seemingly, he maintains that the adverse effect of having children from ‘an exchanged woman’ is only applicable if he realizes during cohabitation that she is the wrong woman).
P’ninei HaDaf - Lublin