The Rules say
The Elven description includes (PBR 15, PHB 23):
Fey Ancestry. You have advantage on saving throws
against being charmed, and magic can’t put you to sleep.
Trance. Elves don’t need to sleep. Instead, they
meditate deeply, remaining semiconscious, for 4
hours a day. (The Common word for such meditation
is “trance.”) While meditating, you can dream after a
fashion; such dreams are actually mental exercises that
have become reflexive through years of practice. After
resting in this way, you gain the same benefit that a
human does from 8 hours of sleep.
Interpreting this
Elves explicitly do dream, but not in the same manner as non-elves.
Elves cannot be magically put to sleep.
None of this precludes elves being able to sleep. Nor does it say they can sleep.
Note that dreaming is not natural, but is a learned behavior based upon the above quote. The trance state may be learned, or may be innate, but the mechanics do not indicate one way or the other. And note the caveat: it's mental exercises, not true dreams.
There are thus 3 key DM decisions left to make, then.
- Is trance natural or learned?
- Is willing sleep different from magical sleep?
- If willing sleep is different from magical sleep, can an elf willingly sleep?
The answer can be picked as desired.
For myself, I pick "Natural" and "different", and "only with wilful effort."
As for unconscious:
Unconscious and Asleep are not synonyms. While it's true that everyone asleep is unconscious, not everyone unconscious is asleep. And normal people don't generally dream when unconscious for reasons other than being asleep.
And, given that the elven dreams are due to mental exercises, it's reasonable to conclude they should not occur except when in trance.