The physical illness is derived from her unhappiness because she is not allowed to visit cousin Henry and Julia which made her feel very unhappy and that led to her not eating because she feels so secluded from everyone. She was also not allowed to work until she was well enough since she did not move a lot during the day and mostly slept and this can affect the body a lot when one can't move a lot. Whenever she would get the chance she would write about what she saw in the wallpaper or even about something, and this would be as soon as John would come around because he said that it wouldn't be good for her condition.
Her mental illness seems to really get out of control when the yellow wallpaper in her room starts to make her become really obsessed with the pattern in the wall paper, she believes the images are of a women creeping behind the paper and the pattern is holding the women in and she can not escape. Her fixation of staring at the wall to try to make out the images of the women and trying to find a way to help then is a sign of her mental instability. In the end she locks herself in her room and starts to rip off all the wallpaper and just sits thereanother sign of her diminishing health. John is of no help to her at this time even though he tells her to open the door