In the days of wind-powered sailing vessels the wind was generally traveling from the stern (back) of the boat to the bow (the front of the boat). In addition the figureheads of boats were on the bow (front or head of the boat). With the wind blowing any odors forward, the lavatories were placed at the front or “head” of the boat which is where the term originated.
Some ships had tiny grated platforms on either side of the bowsprit (where the figurehead is located) for the crew to use. By being at the very front of the ship, the areas were naturally cleaned by splashing waves further keeping odors away.
Some ships had small enclosures, shaped much like outhouses, that were placed far forward on one or both sides of the bow causing crew members to proceed to the bowsprit or head of the boat. Placed somewhat above the water line, vents or slots cut near the floor level would allow for normal wave action to wash the facilities out.
Only the captain of a vessel had a private facility near his quarters at the stern of the ship in the quarter gallery.
So….what is the poop deck anyway? Stay tuned!