I cannot comment with any kind of authority on this subject that you are asking. However, I can relate an incident with me and some with a few other people that I know had similar problems.
I had knee surgery 30 years ago before orthoscopy became common practice. Laying my knee wide open and 3 major slits caused considerable pain. AFter the surgery and release from the hospital, I returned to work (minister) preaching and in the church building work immediately. The doc gave me some pain pills. I was able to think reasonably clear, evidently, but I did take a pill a day for a week after being released from the hospital. In that first week after getting out of the hospital, a cousin came and stayed with us for 3 days.
A few days after he left, some church members commented on my cousin. I asked them how they knew him. They looked at me like I was crazy. LOML and the group convinced me to call him. Yes, he had been there, and he left a gift for me that I had, so obviously he had been there. This was during the week after being released from the hospital. I had no memory of that. And I was told that I had taken him (he drove) to different member's houses for visits, but for me - no memory of the first week out of the hospital and I worked on crutches as though normal. I remembered the few days in the hospital and people that came to visit, but not the week after release. (The one side effect was that people said my messages were astounding that week). [:I] [

)] Over the next several months, I would go through spells of just being "foggy" for days at a time. Church members would jokingly ask me if I had taken any more pain pills.
I have visited quite a few people over the years who were hospitalized and who had surgery or were heavily medicated for a while. Most people did well, but it became obvious to me that some people react differently to drugs and some have long term (months) effects from these.
My wife had a hysterectomy here in Japan, and while her Japanese language learning did not suffer, for several months, she went around saying she felt like she was in a fog. The "edge" that made her sharp and "who she was" was gone. It was about 6 months before she was her normal self, and she did not take any medicines for more than a week after leaving the hospital.
I am not saying that this applies to the friend for whom you are concerned, but this does happen on occasion from medicine effects on a few people.