Surgery, the actual trauma of surgery, the anaesthesia that they use for surgery, the meds they use when you're kept under following the surgery, and the meds they use for pain following surgery, all affect the brain majorly !
My first day in ICU was the only day I felt 'normal' ! That's not a memory thing, I felt really well, perhaps that was because I was on morphine which suited me much better than the pain meds I was put on when I was moved to high dependency and the ward (morphine can also give a sense of well being which I think we need post surgically !). The pain meds I was moved on to were dihydrocodeine and Tramadol which actually weren't much use for pain for me (not everyone is helped by those particualr meds). I stopped caring about most anything, it was a kind of apathy. I couldn't eat, I literally didn't feel like I cared to eat - no appetite, not even for fluids - this was very difficult as I lost a huge amount of weight which was masked by the fluid retention from surgery. Once I'd susequently lost the surgery fluids around two weeks later I was way underweight. I also didn't care to do the breathing exercises I was supposed to do. I had practiced them fine prior to surgery and I could do them fine in ICU, but afterwards I didn't do them. I simply didn't care. I didn't cough either - I have small airways disease and was given the wrong inhaler and that made it all worse so that I ended up with pleural effusions ! I did the walking up and down the hospital corridor but just the minimum four laps I was instructed to do !
Several doctors have told me susequently about how this kind of surgery, the anaesthesia, the pain and narcotic pain meds afftect the brain.
The only thing that didn't get affected was my memory ! I also wrote stuff down just in case it did - I felt it important to keep a record of what happened.
PS - just remembered something rather ironic: prior to surgery I was discussing with my endocrinologist what I would eat in the hospital. I was in a private hospital which meant hotel style catering. I was so excited that I could have great cuisine and somebody else was going to do the cooking ! I was going to have the full English breakfast of bacon, eggs, black pudding, I was going to have steak for lunch. I could have had those things every day and I ended up with half a glass of milk each 'meal' - I just couldn't care !