Dream Eater only works if the target is asleep. Dream Eater inflicts damage and 50% of the damage dealt (rounded up) is restored to the user as HP.
If Dream Eater breaks a substitute, no HP will be restored to the user. If HP is restored to the user when its current HP is greater than its maximum HP, its current HP will be set equal to its maximum HP.
Dream Eater will always fail if the target is not asleep and, except if the target has a substitute.