ACT 5 SCENE 1
DOCTOR: I have two nights watched with you, but can perceive no truth in your report. When was it she last walked?
GENTLEWOMAN: Since his majesty went into the field, I have seen her rise from her bed, throw her night-gown upon her, unlock her closet, take forth paper, fold it, write upon't, read it, afterwards seal it, and again return to bed yet all this while in a most fast asleep.
Earlier in the play, Lady Macbeth possessed a stronger resolve and sense of purpose than her husband and was the driving force behind their plot to kill Duncan.
When Macbeth believed his hand was irreversibly bloodstained earlier in the play, Lady Macbeth had told him: "A little water clears us of this deed" Now, however, she too hallucinates blood. Her recall falters: her memory obsessively returns to the murder, but she doesn't seem to know whether it's happened yet or not. She is completely undone by guilt and descends into madness.
It may be a reflection of her mental and emotional state that she is not speaking in verse; this is one of the few moments in the play when a major character—save for the witches, who speak in four-foot couplets—strays from iambic pentameter. In fact critic A. C. Bradley has said she is "denied the dignity of verse"—uniquely among major Shakespearean characters making their final appearance.
Compare "Out, damned spot! out" with Macbeth's later "Out, out, brief candle!" in Act 5, Scene 5. Guilt can stain a whole life, but life itself is fleeting.
Obsessive hand-washing is a classic compulsive behavior and, when it manifests over a sustained period, is an indicator of obsessive-compulsive disorder (OCD).