This comes up for discussion regularly and often turns into a lively debate. The last time I flew in an airliner, a 737-800. I pondered the idea of how I would cope if the flight deck door opened and the Captain stumbled out gasping and collapsed unconscious with the FO already unconscious in his seat. In the end I concluded that I would cope quite well initially but it might well end badly when I attempted to land. Coincidentally not so long ago I had an hour in a 'real' sim, actually more of a procedures trainer. But configured as a 737 NG. I got a bit lost once, overstressed the airframe once, overran the runway twice and crashed into the River Thames while trying to fly under a bridge while landing in London City Airport. I should add at this point that I'm a Commercial pilot and fly skydivers for a living. So if I have trouble, imagine the problems someone who never actually flew a real aircraft would have.
By the end of the session I was demonstrating to the bemused 'Instructor' how to make a skydive plane descent and landing in a 737 into London City Airport. It went great until I put a wheel off the runway
All great fun, but imagine this scenario. It's night, you're on a trans ocean flight, the weather is bad and you can see flashes of lightning out there. The pilots pass out cold and you find yourself sitting there with your heart in your mouth. The autopilot is on. What do you do?
It's all very fine if you found yourself in that situation on a fine sunny day somewhere close to a large airport with plenty of time to spend getting briefed by a conveniently available experienced pilot. Add any complicating factors and it becomes a lottery. If you look at the Air France AF447 accident you can see that an experienced crew with three pilots on the flight deck let their aircraft fall into the sea because they were confused over what they were seeing. Almost any pilot will tell you that there are times when in cloud or at night when the eyes disagree with the ears and you have instant vertigo. Only your training prevents you from ripping the wings off.
There's also another factor, remember the Helios 737 accident. Both crew were unconscious but the Flight attendant who actually had a Commercial licence only got access to the flight deck after the engines failed, thanks to the locked door rules. It was far too late.
You'd better hope it never happens to you.