Read the excerpt from "Why I Wrote 'The Yellow Wallpaper.'" This wise man put me to bed and applied the rest cure, to which a st
ill-good physique responded so promptly that he concluded there was nothing much the matter with me, and sent me home with solemn advice to “live as domestic a life as far as possible,” to “have but two hours’ intellectual life a day,” and “never to touch pen, brush, or pencil again” as long as I lived. Why was Gilman advised “never to touch pen, brush, or pencil again”?
Presumably the "Wise man" thought that the person who actually had suffered a nervous breakdown shouldn't be stimulated in any way so that is why he counselled Gilman to "never touch pen, brush or pencil again". In fact, she didn't follow his advice and through her creative work she came back to life again. From myself having written a book, I know that being involved in creating something is very therapeutic and good for the self esteem.
The reason why the doctor advised Gilman to "never touch pen, brush or pencil again" was because he believed this intellectual activity was making her ill. The doctor believed that too much mental stimulation was bad for women, who were naturally fragile and were not used to such kind of mental activity. He believed women were better off at home, living a domestic and quiet life.