It is implied that a person lies down in order to sleep. The meaning of this can be made clear. Alternate translation: "when you lie down to sleep" (See: [[rc://en/ta/man/jit/figs-explicit]])
The writer speaks of sleep that is peaceful and refreshing as if it tasted sweet to the person sleeping. The word "sleep" can be translated as a verb. Alternate translation: "your sleep will be pleasant" or "you will sleep peacefully" (See: [[rc://en/ta/man/jit/figs-metaphor]] and [[rc://en/ta/man/jit/figs-abstractnouns]])