Midshipmen, in the sailing vessels of a century ago, were often familiarly called “reefers,” because, to quote an authority of that period, “they have to attend in the tops during the operation of taking in reefs.”
That duty, especially in cold weather, would prevent the midshipman from wearing the long topcoat of an officer, but as the midshipman was next in line to the lowest commissioned officer it was beneath his dignity to wear a sailor’s peajacket.
Accordingly he wore a close-fitting, heavy woolen coat. It was properly described as a “reefing jacket,” but, because worn by a “reefer,” it too was dubbed a reefer, and this became the common term for the garment of similar cut adopted by landlubbers.
The “peajacket” of the sailor, incidentally, took its name, not from the garden vegetable, but from the Dutch word for “woolen,” pij, identical with “pea” in sound.