This does not have to be the case. There is a secret to a successful visit. All you have to know is that what you say does not matter. Your presence makes all the difference. You do not have to have answers, you only have to be there. Most of the time, all you need to do is listen. It is as simple as that.
If you really need an opening line, try "How are they treating you?" Then be ready to note how many people are there looking out for and helping your loved one or friend recover.
The biggest no nos you need to avoid are trying to fix things yourself (not moving a tray off to one side or moving a trash can closer to the person for their use ... you can do that) or making promises you cannot keep. You are there to visit, not to fix, not to promise. You are there to listen and to support.
It's simple. Just be there with the person for a while. Arrange your schedule so you do not have to rush off in a few minutes, making the person you are visiting feel less important than the next activity. Just clear enough time to be there until the person being visited tires. Then gracefully depart. Repeat this process as needed. Then, someday, when the roles are reversed, you'll receive much desired visits as well.
Remember, recovery is a dull business and there are lots of hours of waiting. You have the power to make that waiting far more pleasant.