The sleep-walking scene is not mentioned in Holinshed and it must therefore be looked upon as an original effort of Shakespeare's creative imagination. Shakespeare presents on the stage the terrible theme of how the entire personality of a human being is eaten up by the sense of guilt. In Lady Macbeth the sense is so strong and deeply rooted in the unconscious that it ultimately brings about psychological disorder in her personality. The sleep-walking scene, where Lady Macbeth shows with a startling degree of accuracy all the symptoms of hysterical somnambulism, is a perfectly logical outcome of her previous mental state. She is not the victim of a blind fate or destiny or punished by a moral law, but affected by a mental disease. But this does not simply focus on the guilty conscience of one character; rather it lays bare the entire tragic process in its extremity: how evil repays.
It is evident from the first words uttered by the Doctor and the lady attendant in the sleep-walking scene, that Lady Macbeth has had several previous somnambulistic attacks. Her speech has become fragmented and broken by an enormous emotional pressure: the suave hostess and cool, domineering wife has been reduced to a gibbering creature whose speech is incoherent. The devastation of her mind is so complete that there are no logical connections between her memories or her sentences. Several complexes or groups of suppressed ideas of an emotional nature enter into this scene and are responsible for it. The acting out of these complexes themselves is based upon reminiscences of her past repressed experiences.
The first complex relates to the murder of Duncan as demonstrated in the continual washing of the hands, an act not seen earlier and here clearly brought out in the sleep-walking scene. This automatic act is a reminiscence of her earlier remark after the murder of Duncan, "A little water clears us of this deed." The second complex refers to the murder of Banquo, clearly shown in the words, "I tell you yet again, Banquo's buried; he cannot come out of his grave," thus demonstrating that she is no longer ignorant of this particular crime of her husband. The third complex entering into the sleep-walking scene distinctly refers to the murder of Macduff's wife and children - "The Thane of Fife had a wife, where is she now?" Various other fragmentary reminiscences enter into this scene, such as Macbeth's terror at the banquet in the words, "You mar all with this starting," the striking of the clock before the murder of King Duncan, and the reading of the first letter from Macbeth announcing the witches' prophecy. Thus a vivid and condensed panorama of all her crimes passes before her. Since blood was the dominating note of the tragedy, it was evidence of Shakespeare's remarkable insight that the dominating hallucination of this scene should refer to blood. The analysis of this particular scene also discloses other important mental mechanisms.
Lady Macbeth's line "What's done cannot be undone" not only reverses her earlier argument to her husband "what's done is done" (Act III, Scene 2); it also recalls the words of the general confession from the Prayer Book: "We have done those things which we ought not to have done, and there is no health in us." The Doctor agrees: In his opinion, Lady Macbeth needs a "divine," — a priest — more than a doctor, reminding the audience of Macbeth's earliest doubts when he argues with himself before the murder of Duncan, "If it were done when 'tis done . . . we'd jump the life to come" (I:7,1-6).
Now, though, the promise of salvation has been all but abandoned. "Hell is murky," says Lady Macbeth, and that spiritual darkness is echoed by the fact that the scene is played entirely in the dark, with the exception of one candle, which Lady Macbeth insists on having next to her. Light represents knowledge and knowledge means clearance of phobia of the unknown; for Lady Macbeth it arises out of her fear of persecution, out of the phobia of the unknown divine retribution. She may be sleepless, but it is her soul's rest that really concerns her.
As a man of science, the Doctor provides the final commentary on the inevitability of the cause-effect relation:
Do breed unnatural troubles: infected minds
To their deaf pillows will discharge their secrets”.
Finally, she emerges as a human being of flesh and blood completely devastated by guilt and shame, as opposed to her witchlike personality in the earlier scenes.