This line from Shakespeare's Macbeth uses personification and metaphor.
Sleep is given human characteristics by the suggestion that it can sew--knit up something. This is personification. Sleep possesses healing powers and can put back together what a day's trials tear apart.
And care is metaphorically compared to an unraveled sleeve.
In other words, after a rough day when everything seems to be unraveling, sleep sews everything back up. And Macbeth has murdered sleep--sleep will be no more. The daily cares of life are the tenor of the metaphor, and sewing up an unraveled sleeve is the vehicle by which the tenor is explained.
The line contributes to the insomnia prevalent in the play.
Sleep is being personified here in this quotation from the play "Macbeth" by William Shakespeare. The author is using several images and symbols to show us how people derive therapeutic rest and recuperation from daily stresses through sleep. He is saying that sleep is like a person (a mother?) who knits or darns holes such as those in a sock or garment which has become ragged and frayed through overuse or rough handling. In the same way, the restful therapy of sleep should ease all our cares away, remaking our tired and frazzled souls during the night. Sadly, for MacBeth and Lady MacBeth, the strain of their guilty and evil plans denies this balm of sleep. Guilt and fear keep them awake at night and cause nightmares and sleepwalking.
In addition to the other editors' posts about personification, Macbeth's quote in Act II, scene ii of Macbeth is a metaphor (an analogy), and it is filled with two types of imagery.
Metaphor / Analogy: Translated, it means, "sleep that straightens out the tangled coil of worry." Macbeth and his wife have murdered Duncan and sleep, so Macbeth is comparing the act of sleep to to the act of unravelling. Sleep unravels worry the same way a weaver unravels thread. He will not sleep for the rest of the play; instead, he will forever worry and be paranoid that someone or something supernatural will discover his crime.
Imagery: the line contains two types of imagery: "sleep" and "clothing." The leitmotif of sleep runs throughout the play. The lack of sleep is a result of guilt, and it will drive both Macbeth and Lady Macbeth crazy by the end of the play.
Macbeth is also full of clothing imagery: "borrowed robes," the "crown," and "the sleeve." These images underscore the domestic and gender differences between the couple. Ironically, Macbeth makes an analogy here about a feminine domestic duty (sewing).
I think that you can argue that there are two figures of speech in this passage.
First, you could argue that there is a personification here. You can say that the speaker is saying that sleep can knit things, which obviously it cannot. That's personification -- giving something that is not alive the ability to act like a living thing.
Second, you could say that there is a metaphor. The speaker is comparing a person's worries and cares to a knitted sleeve that is coming unraveled and has to be mended. Because the speaker does not say "cares like a sleeve..." it is not a direct comparison. That means it's not a simile.