The theme of sleep does play a role in Macbeth, particularly in Act II, scene II after Macbeth murders Duncan and begins to feel overwhelmingly guilty. His guilty conscience causes him to have insomnia. Macbeth characterizes sleep as the "chief nourisher in life's feast," having the ability to "knit up the ravell'd sleave of care" (II.ii.51, 47). When he returns to his room after murdering the king, Macbeth is incredibly convicted feeling; he believes he hears the kings' sons talking in their sleep, and one voice cries out, "Sleep no more! Macbeth doth Murder sleep” (II.ii.46-47). When Lady Macbeth asks her husband to clarify his meaning, he delivers these famous lines:
“Glamis hath murdered sleep, and therefore Cawdor
Shall sleep no more. Macbeth shall sleep no more.” (II.ii.54-55)
In this quote, Macbeth refers to Glamis, Cawdor, and Macbeth; all three are self-references. Macbeth was originally Thane of Glamis when the play began and was promoted to Thane of Cawdor by Duncan. Macbeth's dialogue suggests that no matter his station, whether Thane of Glamis or possibly the future king, sleep will elude him because of his crimes.
Shakespeare uses sleep as a metaphor for restoring peace and balance to the body and soul. Macbeth and Lady Macbeth's evil, self-serving actions have destroyed that fragile balance, and as a result will suffer sleepless nights during the play. Their lack of sleep will wear on them physically and mentally. Even Lady Macbeth notes at the feast when Macbeth over reacts to seeing Banquo's ghost, that she believes her husband's paranoia to be a result of lack of sleep. Then later Lady Macbeth also succumbs to a sleeping disorder, finding no rest or repair in the act; rather her sleep becomes a fixation for her own guilt as she sleepwalks and repeatedly washes imagined blood-stained hands.
The theme of sleep occurs throughout Macbeth as Shakespeare cleverly uses his characters' insomnia as a physical metaphor for a much deeper psychological issue.
Additionally, by saying Glamis and then Cawdor hath murdered sleep Shakespeare effectively uses metonymy ( a quality or characteristic of a thing to replace the thing itself, here the titles or duties of the thaneship to represent the man, Macbeth). One might also suggest that the thane of Glamis, Macbeth before the witches got involved, was a skilled yet ambitious soldier, and the one responsible for all the acts that followed, not the witches, not his wife.
It has been said, "a clear conscience is a soft pillow" which means that a mind at peace sleeps well. So, the opposite is the critical idea in Macbeth. Macbeth has murdered; he now carries the guilt that goes with the crime. His sensible self knows he did wrong, and he further knows his conscience will grapple with the morality of his crime. Shakespeare here reveals his brilliance with character development and conflict. He has crafted a character who knows right from wrong, knows what he should have done, but who also could not do it. He knows he will never become his better self. Macbeth was conflicted before he killed and now that the act has been commited, he knows he must suffer the consequences of his acts--sleepless nights, a guilty conscience, a tormented soul. When Macbeth says, "Macbeth doth murder sleep" he acknowledges his double crime--Duncan's murder and his own spirit.