This sounds like dementia, but if the question is looking for an answer that has to do specifically with the post surgery situation, I would say the man might be in shock or simply behaving this way on behalf of his pain medication depending on how long after the surgery this is.