In the Royal Navy, the term "cockpit" originally meant the place where the coxswain was stationed. This led to the word being used for the area near the stern of a small boat that houses the rudder controls. The midshipmen and master's mates were later assigned to sleep in the cockpit. It was also the place where the ship's surgeon and his mates were stationed during battle.