[not a pilot] Going by a CBS News report, an alleged eyewitness report, and others, a rough chronology seems to be:
1) Co-pilot invites pilot out of the cockpit.
2) Off-duty pilot sitting around row 13 is escorted to the cockpit by a cabin attendant
3) Pilot is restrained by passengers, apparently encouraged by a cabin crew public address announcement, as has been recounted on this forum.
Other reports claim that the captain tried to enter a lavatory. Perhaps someone knows the locations of lavatories on this particular airplane.