The subject of this painting was inspired by the Greek myth of Endymion who, having been granted the gift of eternal youth by Jupiter, is sent to sleep forever. Solomon here shows the moon goddess Luna visiting Endymion, as she does every night.
http://www.tate.org.uk/art/artworks/solomon-the-moon-and-sleep-t01719