What does the expression “to sit in a puddle” mean?

In the play ‘The Lower Depths’ by Maxim Gorky, one of the characters, while playing cards, grins and says to his interlocutor: “You, your Excellency, have, once again, solemnly сели в лужу (“seli v luzhu” or “sat in a puddle”)!” Not literally, of course! It means that the person has found themselves in a stupid, awkward position of their own doing.
The roots of this expression go back to the old days, when fist fights were popular. The winner was the one who knocked their opponent to the ground. If the competition was held in the fall or after heavy rain, the losers could easily fall into a puddle.
However, some researchers believe that Napoleon had something to do with the saying. In 1812, his troops were defeated near Maloyaroslavets on the Luzha River. The newspapers wrote about the victory over him: “Napoleon sat in a Puddle!” or “Наполеон сел в Лужу!”
An English equivalent would be: “To put one’s foot in it.”