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.
The helmsman could be weird...
Neither constructs, elementals, oozes, non-native outsiders, plants, nor undead need to sleep, therefore the helmsman could be a creature with any of these types or take feats or prestige classes that transform him into any of these types. However, a helmsman could also take...
- The general feat Tomb-tainted Vitality (Libris Mortis 31), among other effects, grants the creature the ability to go without food and sleep (yet the creature must still hydrate—whatever). The feat's prerequisites include the feat Tomb-tainted Soul (LM 31) and a nongood alignment. The feat gives the creature a "freakish skeletal appearance"—which seems a little judgy. Also, giving the helmsman these feats likely makes naming the helmsman Charon no longer optional.
...Or the vessel could be trapped (but in a good way)
Using the feat Craft Wondrous Item (PH 92) the vessel could have installed near the wheel a magical trap (DMG 74) that's a boon trap (Dungeonscape 135). Boon traps are horrible, notoriously both vague and broken, but this boon trap will be used only for...
- The 4th-level Clr spell remove fatigue [trans] (Book of Exalted Deeds 105) grants 1 touched creature/2 levels the benefits of 8 hours of restful sleep (but casters, if they need rest, must still get it). The spell removes the condition fatigued if present and permits the target to rest 1 hour to remove the condition fatigued if, before the spell, the target had the condition exhausted.
The DM must decide on the boon trap's precise effects, but it probably won't cost more than 50,000 gp, which, while expensive for such a trivial effect, really is a trivial effect. Taking the wheel'll trigger the boon trap which will cast the spell remove fatigue on the creature, letting almost any creature serve as overnight helmsman.
Trivia
There're no penalties for not sleeping unless sleep's necessary for something else, like preparing spells afterward. However, everyone knows sleep's a thing, so folks sleep even if the game doesn't mandate they must.
For those who will not be constrained by petty, demanding reality, Elder Evils, under the additional sign of the apocalypse Appaling Fecundity, presents some rules for sleep deprivation, saying that
A living creature can go without sleep for a number of days equal to its Constitution modifier (minimum one). Thereafter it is fatigued, remaining in this state for a number of days equal to its Constitution modifier (again, minimum one); if it would become fatigued during that time, it is exhausted instead. Each day after that period, the creature takes 1 point of Wisdom damage. If the total Wisdom damage exceeds its Hit Dice, the creature is affected as if by an insanity spell. (ElE 9)
The book then goes on to mention that during the Appalling Fecundity sign, one can't recover the Wisdom damage caused by lack of sleep (which is pretty clearly not the case for normal sleep loss). To clarify, the Wisdom damage accumulates until the creature falls unconscious, and lack-of-sleep effects (fatigue, exhaustion, Wisdom damage, insanity) are fixed only by sleep.
Although presented in the context of a Sign of the Apocalypse, these are decent (if long-winded) rules, finally published near the end of the game's run, for those who insist their characters needn't sleep. (Although anyone who insists his character needn't sleep will probably also insist these rules be ignored unless that sign of the apocalypse is present.)
Best Answer
From the Unofficial Pathfinder FAQ (Q: Do Elves Trance?), quoting Creative Director James Jacobs:
They dropped trance because they felt it was setting specific. Default Pathfinder Elves don't trance, but they could in your setting.