Rabbi Chaim Vital apparently married at a young age. According to one legend, his first wife was Hannah, the daughter of a certain Moses Saadia. It was an unhappy marriage[.]The following I excerpt from the post at DreamingOfMoshiach, itself summarizing the contents of a passage in Rav Chaim Vital's Sefer Chizyonot.
It was Friday night, 8 Tevet when I said Kiddush and sat to eat. Tears were flowing from my eyes because 2 months ago, 10 Cheshvan, I married Chana and she performed witchcraft on me. I asked HaShem thru 'dream question', how is it that I got this tremendous trouble, especially because she's causing me to bitul Torah (waste precious time from learning Torah). From so much worry, I could not eat or think. I would lay in bed crying till I'd fall asleep. While sleeping, I had a dream within a dream.Thus, he believes that his wife is a witch who performed witchcraft on him. This could well stem from the fact that he has an unhappy marriage. Then again, I would not discount it. After all, Rav Chaim Vital has mystical leanings, which find expression in his dreams and in his study of kabbalah. His wife might have similar mystical predilections, and if she delved into practical folk mysticism (much like some modern day segulas), it is quite possible that she performed witchcraft on him. Or perhaps he happened to spy her when she went to the mikveh and saw that she could not submerge under the water, because she floated, because ... she weighed the same as a duck. Regardless, we know her name and her family, so I wonder what this is in terms of spreading this lashon hara about her that she is a witch. Now, many years after the fact, it is not such a problem. But back then, such an allegation... well, the dream apparently has some connection to shiluach haken, in parshat Ki Teitzei. But parshat Ki Teitzei also has the chapter of motzi shem ra al besulas yisrael.
So he has marital difficulties. And he asked Hashem for help resolving it, so that this dream is a response to it. An ... interesting ... portion of it:
I was weeping very hard and suddenly I see a beautiful important woman standing on top of the ladder and I thought to myself, 'this is my mother'. And she said, "What are you doing Chaim, my son, why are you crying? I heard your weeping and came to help you." She reached her right arm and raised me to the top of the ladder. In Heaven, I saw a big round window and big fire flames coming out and entering this window, it was like lightening (sic) and extremely hot. I understood that this is the hot burning sword placed at the entrance of Gan Eden. I bitterly cried again for my mother to help me enter inside Gan Eden. "My mother, my mother, help me so the hot burning sword will not burn me." My mother said that she can't stop the hot burning sword but she can advise me how to enter inside Gan Eden, "Put your hand to your head and you will find cotton, white as snow. Place the cotton on the window and quickly pass thru to enter inside Gan Eden." I did as my mother advised and put my hand on my hair. I was young and the color of my hair is black but miracoulsy, it turned into white cotton, in the secret of ושער רישיה כעמר נקא, (Daniel 7;9).So in response to his marital difficulties with his wife, he has a dream about a beautiful woman, who is his mother. His mother, in contrast to the witch he married. Does this seem Oedipal to you yet?
And he tells his mother his problem. He wants to enter "the big round window" so that he can enter "Gan Eden." But there is a long, burning flaming sword which will not let him enter this big round window. I do not think I need to spell it out, but big round holes which one tries to enter (and which involve pleasure upon entering) have a specific meaning. As do long, burning swords. And asking his mother to help him do this... well, I don't put much stock in Freud, but in this particular instance, the conclusion about the dream's meaning is fairly clear.