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.
Can a Trancing elf move, such as by slowly walking in circles (pacing), without interrupting the Trance?
(The specific reason I’m asking: I have an Elven Speedster character whose concept includes to be “always on the move, lest he dies”, a bit like a shark.)
Yes, but only up to 1 hour.
Nowhere in the rules does it say that an elf has to remain stationary when they Trance, so it does appear possible (though problematic for avoiding falling prone). However, they are still limited in how long they can walk for.
The rules for Long Rests state
Thanks to Medix2 for this detail:
The Sage Advice Compendium has this for how to address the Elven Trance feature
So, since a Trance replaces sleep during a Long Rest, and pacing (walking) is considered strenuous activity, an elf can only do it for up to 1 hour without having to restart their Long Rest.