The obligation of Heseba requires leaning to the left at certain points during the Seder, including when drinking each of the four cups. The Shulhan Aruch rules that this obligation applies equally to men and women. The Rama (Rav Moshe Isserles of Cracow, 1530-1572) writes that in ancient times, women often did not sit with their husbands, and thus would not be required to lean, but nowadays, women must lean just like men.
The Shulhan Aruch (Orah Haim 472:7) rules that if one forgot to lean when leaning is required, he must repeat the act while leaning. Thus, if one forgot to lean while drinking one of the four cups, he must drink another cup while leaning. For example, if, after eating the Karpas, one remembers that he had not leaned while drinking the wine at Kiddush, then he must fill his cup and drink while leaning, without reciting a Beracha. He then proceeds to Yahatz.
When one forgets to lean while drinking one of the first three cups, it is clear that he does not recite the Beracha of "Boreh Peri Ha’gefen" when he then drinks again. When it comes to the fourth cup, however, the Poskim are in disagreement as to whether one who forgot to lean and then drinks a fifth cup recites a Beracha when he drinks the fifth cup. The Shulhan Aruch (Orah Haim 480) writes that since we do not expect to drink any more wine after drinking the fourth cup, one who remembers afterward that he had forgotten to lean must recite a Beracha over the fifth cup. This case is one of "Heseh Ha’da’at" – where one’s attention was diverted from drinking, as he had assumed that he would not be drinking any more, and so a new Beracha is required when he then drinks again because he had forgotten to lean. This is the Shulhan Aruch’s ruling, based on the position of the Rosh (Rabbenu Asher Ben Yehiel, Germany-Spain, 1250-1327).
Rabbi Akiba Eiger (1761-1837), however, in his notes to the Shulhan Aruch, cites the Ginat Veradim as disagreeing with this ruling. In a different context, the Shulhan Aruch writes, based on a comment by Rabbenu Peretz (France, d. 1295), that when we sit at the Seder table, we are considered guests of the Almighty. We are to see ourselves not as sitting in our own homes, but rather as sitting at G-d’s table as His guests. Now when a guest finishes drinking, and then more wine is brought, he does not recite a Beracha over the additional wine. A guest is completely dependent on his host, and always anticipates the possibility that more will be served, and so even after he eats and drinks, there is no "Heseh Ha’da’at." As such, he does not recite a new Beracha when more food or drink is served. Therefore, even if one forgot to lean when drinking the fourth cup of wine at the Seder, he should not recite a Beracha when drinking again, because he has the status of a guest, who does not recite a new Beracha when he drinks again after having finished drinking.
Accordingly, Hacham Bension Abba Shaul (Israel, 1924-1998) rules that we apply to this situation the famous rule of "Safek Berachot Le’hakel" – that we do not recite a Beracha when it is uncertain whether it is required. Therefore, if one forgot to lean while drinking any of the four cups, he drinks another cup without reciting a new Beracha.
Incidentally, it should be mentioned that although Haggadot include the Beracha Aharona for wine – "Al Ha’gefen" – after the fourth cup, only those who drank a Rebi’it of wine recite this Beracha. The cup of wine at the Seder must contain at least a Rebi’it – approximately 3.1 oz. – and one should preferably drink the entire cup for each of the four cups, but if this would be very difficult, it suffices to drink the majority of the cup. Many people find it difficult to drink an entire cup of wine toward the end of the Seder, and so it is quite common for people to drink less than a Rebi’it for the fourth cup. One who did not drink an entire Rebi’it for the fourth cup must ensure not to recite the Beracha of "Al Ha’gefen" after drinking.
Summary: One who forgot to lean after drinking any of the four cups of wine at the Seder must drink an additional cup as soon as he remembers. He does not recite the Beracha of "Boreh Peri Ha’gefen" over the new cup. If one drank less than a Rebi’it (3.1 oz.) for the fourth cup of wine at the Seder, he must ensure not to recite the Beracha of "Al Ha’gefen" after drinking.