I had to ween my mother off moraphine and xanex after her being prescribed them for years. Her outlook and mood became much better after cleaning her up from these drugs. She is old half blind and has a hard time hearing. She shows signs of dementia and I would imagine it sucks really bad to be old. That is a sad affair in itself.
Morphine is a powerful painkiller. What is she using for pain relief?
Xanax is generally for anxiety. Is she still showing signs of anxiety or agitation?
A consult with a good geriatric psychiatrist should be sought if the needs meds for behavioral or emotional issues.