The captain must have been high.
If you get "trapped" in the lav (what doofus gets trapped in a lav?), simply ask the passengers to get the FA. Tell the FA that you're an idiot and that you're trapped in the lav. The FA uses the interphone to call the flight deck and notify the first officer that he's on his own for landing at LGA.
Give a guy with "a thick foreign accent" the passcode for the flight deck door and ask the passenger to try to access the flight deck?
If any of this is actually true, the captain needs a drug test, some time off and some retraining.
edit: Small RJ and only one FA, who was with the first officer on the flight deck. Passenger should have been instructed to yell to the first officer thru the door that he was on his own because the captain was stuck in the lav. Giving the pax the passcode? The remainder of my original post stands.