They're socks with grippy material on the bottom to keep you from slipping. They give them to you when you're admitted to the hospital. The implication is that they were sent to the psych ward and put on suicide watch.
It is my understanding that the joke is misinterpreted or maybe correctly interpreted as some serious problem with the person, so that the therapist puts them in a mental hospital, where those things are worn instead of shoes.