After the Kiddush on the first night of Succot, two Berachot are added. First, "Lesheb Ba’Succah" is recited on performing the Misva of sitting in the Succah. Afterward, "She’he’hiyanu" is recited both for the Misva of sitting in the Succah, as well as on the holy day of the Hag itself. If one reversed the order, he has still fulfilled his obligation.
The original Minhag in Haleb was for everyone to sit down immediately after reciting "Lesheb Ba’Succah," and then the Mekadesh would recite "She’he’hiyanu" while sitting. Today, this is not the accepted practice. Instead, the custom is to follow the Arizal (Rav Yishak Luria of Safed, 1534-1572), as cited by the Kaf HaHaim, who ruled to say both Berachot standing and then sit to drink the wine.
If one forgot to recite "Lesheb Ba’Succah," until he already sat in the Succah, he may recite it then, when he remembers. This in accordance with the Rambam (Hilchot Berachot 11:5) that as long as the Misva is continual, like Succah, which is constantly being fulfilled every moment one sits in it, he may still recite a Beracha and it is considered "Over La’Asiyatan" (A Beracha prior to the fulfillment).
SUMMARY
One should stand while reciting the Beracha of "Lesheb Ba’Succah" and "She’he’hiyanu." One may recite "Lesheb BaSuccah" even if he already began sitting in the Succah.