If the two persons on the flight deck is such a critical procedure as the door can be locked from inside leading to a mentally unstable person being able to abuse of the aircraft for other than the intended purpose, I wonder, as has Nigel, on the potential backdraws of such procedure.
A better way, IMHO would be to have an override key in the cockpit that the person wanting to take a personal break takes with him/her and therefore can get into the cockpit any time.