I think it could mean, joy comes after you have had a rough day.
To be able to wake up, with a different frame of mind. Maybe a new perspective, possibly another chance to change something.
I do not know for sure, guess I could Google it!
I do know though this, if you carry things that bother you to bed and those things are preying on your mind, you can’t really have a good morning, now can you?
So it is best to go to bed with a clear conscious, a satisfied heart, perhaps a grateful one. You will then awake with joy in your heart.
Joy that you are alive, your heart is mended, and your given another chance to do whatever you need or want to do.