Sorry not to be back before now.
Difficult to say, in part because she was adept at hiding behind a veil of courtesy. And it came and went; as she got older you could see the gears slipping from time to time.
But generally it took at least a week after all infections had gone away, maybe double plus plus plus, before she was back to her normal self. We learned to let it take its time as pressure was unhelpful.
An easy format newspaper, Times, Independent, glossy mag, family photos from time to time, a local eg parish magazine or circular from RNLI, i.e. places/ things/people/charities she was interested in all helped. It was a bit like exercising a muscle after a break or sprain, reorienting her. Hospitalisation in any case often takes away the desire to know what's happening outside, so this was bringing in gentle stimulus. And when she got tired I just sat there quietly with her, not expecting very much. Seemed to work. I used to say things like" DSis has just rung, it was her 50th birthday yesterday, you remember what it was like when she was born and Mrs X came to see you." I didn't ask questions, that put too much pressure on: it was the reverse of target questions. Open questions were ok, as long as no decisions had to be made.
She found it distressing, so I tried to reassure her that this was normal for this stage of recovery, she would get better, we would always love her no matter what, and would not let her be incarcerated.