When I was a college student, a friend of mine who majored in psychology told me that she had read a study that showed students who dressed up when they took a test had higher scores than those who wore "regular clothes". I'm not sure of the scientific validity of that study but it sounded like something with merit and I took the results to heart. When I had exams I always wore a nice dress, took time to style my hair and wore make-up and jewelry. It was quite a stark contrast to my usual college student apparel of a rumpled t-shirt and jeans. I'm not sure if it impacted my scores but I did make the dean's list a few times and I certainly felt like it helped. The idea that when you look better, you feel better and that that improves your success rate is nothing new. Most career advisers recommend dressing well as a way to express professionalism, to feel confident, and to improve your career. I believe it is important to apply the same logic when you are coping with illness.
Often when you are coping with major illness or recovering from surgery or injury the last thing you want to think about is your appearance, and of course it is perfectly fine to ignore your appearance. Basic hygiene is often a struggle when you're not well, so dealing with the finer details of make up or shaving or styling your hair is just not possible. As a patient you only have so much energy and often can't spend it on your appearance; this may be the case the majority of the time. However you may find it helpful to occasionally make an effort to tend to your appearance.
One of the reasons this can be helpful is that it returns you to "normal life" a bit. When my husband was sick he often said that taking time with his appearance made him feel human again. He worked from home and didn't have to leave the house except to go to doctor's appointments. However much of the time that he was sick he started his work day by showering, changing into fresh clothes, and shaving. I believe it helped to provide a sort of distraction from the illness. Whenever it's practical to do so, sticking to your usual routine can be comforting and stabilizing.
I believe another reason it helps is that it can sometimes mask some of the outward signs of illness. Sometimes when you are sick or recovering it can feel like that is the entire focus of your life. As a caretaker I often felt like I had a sign on me that said "cancer" because that is what occupied my mind nearly all of the time. Patients can often feel like their condition is their identity. While this is a natural part of coping with disease, most doctors will tell you that focusing your thoughts on "regular life" as much as possible is useful in the healing process. Physical signs of illness can validate your identity as a sick person. So getting back to your usual appearance even in very small ways can help to shift this phenomenon.
It's also good to have the confidence boost that comes from feeling better about your appearance. A client of mine suffers from a chronic condition that causes extreme fatigue. Most of the time when I take her to doctor's appointments she is dressed in comfortable very casual clothes, usually wears a hat to cover her hair, and doesn't bother with make-up or jewelry. However sometimes she's dressed in some of her nicest clothes, styles her hair perfectly, and has flawlessly applied make-up. I once commented on how nice she looked and she said "This is how I help deal with how awful I feel on the inside." She has been coping with her condition for years and has found that sometimes feeling pretty does help her heal a tiny little bit. She makes this effort on improving her appearance mostly when she is experiencing unusually severe symptoms. It may not change her condition but for a few moments she feels better.
As with all things you can do while coping with illness or recovering from surgery this may not be helpful to all patients. You will probably find it to be helpful on some days and not so much on other days. Illness and recovery is not a linear process and each day is different, but sometimes taking a little time to feel more attractive can be one small thing that makes a difference.