An elf receives the benefits of a long rest in 4 hours while using the "Trance" trait.
According to the 2017 update to the Sage Advice Compendium:
Q: Does the Trance trait allow an elf to finish a long rest in 4
hours?
A: If an elf meditates during a long rest (as described in the
Trance trait), the elf finishes the rest after only 4 hours. A
meditating elf otherwise follows all the rules for a long rest; only
the duration is changed. This answer has been altered as a result of
a tweak to the rules for a long rest, which appears in newer printings
of the Player’s Handbook.
This ruling reverses guidance in the earlier version of the SAC, due to errata changing the rules for long rests.
Interactions between the "Trance" trait and long rests
A long rest is defined as:
... a period of extended downtime, at least 8 hours long, during which a character sleeps for at least 6 hours and performs no more than 2 hours of light activity, such as reading, talking, eating, or standing watch.
The elf's Trance trait is defined as:
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.
Since the "Trance" trait replaces the need for sleep (which most races need in order to complete a long rest), the elf is able to satisfy the requirements of the long rest while in a semiconscious trance for four hours.
It's first worth mentioning that the Sage Advice you cite is now obsolete; errata have been released which contain a correction so that long rest does now require sleep as a general rule:
A long rest is a period
of extended downtime, at least 8 hours
long, during which a character sleeps for
at least 6 hours and performs no more
than 2 hours of light activity, such as reading, talking, eating, or standing watch.
The Basic Rules (which still give the original version) and the PHB (which is updated in newer printings and on D&D Beyond — payment required) don't say exactly what happens if you continue to not sleep, other than not getting the benefit of a long rest, but
Xanathar's Guide adds rules for this: DC 10 constitution saving throw to avoid a level of exhaustion after 24 hours of being awake, and the DC goes up by 5 for each additional 24 hours.
For some reason, there's no level of exhaustion between "so tired you can't move" and "completely dead". It seems like at some point "you fall asleep" would be on the chart, but, nope. Death it is.
With that in mind, a Con 10 character without proficiency in that save has a 16.5% chance of being fine after 48 hours, but only a 0.82% chance of feeling normal after 72. (Of course, a character who made it through the first 48 has a 5% chance of one more night where everything seems fine.) After that, though, the DC is impossible, so it's just a matter of counting down to sudden, permanent sleep.
You'd think a level 20 barbarian with 20 Con would be much better at ignoring the pesky limitations of mortal flesh — and indeed the first night doesn't even require coffee, and the second presents just a 15% risk of getting a level of exhaustion. But as the DCs go up to impossible levels quickly, outside the bounds of 5E's math, everything goes downhill suddenly. Even with a streak of good rolls (early on, where they even matter), the eleventh night is certain death for even the most hearty hero.
Apparently sleep is significantly more important in D&D than in the real world; in 1965 a high school student stayed up for 11 days, with no apparent long-term harm. And there is no indication that this student was particularly proficient in Con saves, or even had class levels (beyond those available in high school). Scientists have monitored subjects kept awake for 8-10 days, also with no harm that couldn't be fixed by "one or two nights of recovery sleep" — which is much faster than 5E's slow recovery of one exhaustion level per night.
I find this somewhat disappointing: I know that D&D is not a good physics simulator, but I expected it to be pretty accurate on the subject of all-nighters.
In seriousness, I think the "and now you're dead!" thing is primarily there to make players take this seriously and not just never sleep except when spells need renewed. Personally, it's never come up in a game that I've run, but if it did, I would add "hourly con saves to stay awake" at level 4 and increase that to "every minute" at level 5, with further exhaustion only happening if some effect causes it or if you are forcibly kept awake.
Best Answer
New errata confirms that you sleep for at least 6 hours and perform any light activity for no more than 2 hours.
Your second interpretation is thus correct. According to the v1.22 Player's Handbook errata: