The first benefit of loving-kindness is that you can sleep peacefully. There is a difference between sleeping peacefully and sleeping well. This is related to the second benefit, which is that you wake up peacefully, and that is related to the third benefit where it is said you don’t have any nightmares, any unpleasant dreams.
What are these unpleasant dreams we have, these nightmares? I would suggest that they are related to the emotions we are repressing, perhaps related to the wounds that we are holding onto. So with loving-kindness you heal these wounds, then you don’t have these nightmares or unpleasant dreams, and then you can sleep peacefully and wake up peacefully.
In Sri Lanka, sometimes I work with people who suffer from insomnia, and the way I try to help them is by the practice of this simple method of loving-kindness before they go to sleep. It has been interesting for me to see that it works most of the time.