Happens all the time with confused SLF all around the world. I have watched many passengers on the access camera attempting to enter the cockpit looking for a place to have a Jimmy.
The big question is how persistent and whether the crew reacted appropriately. If he could not be assisted and redirected without restraint, good job. If conversely he was agitated and just needed a helping hand the converse is true, it will be interesting to see what info was passed from cabin to cockpit before the emergency was declared. From my POV I would prefer an over-reaction until controlled, as the situation can always be de-escalated.