Where does the saying 'show a leg' come from?

Dido in Despair (caricature) by James GillrayDido in Despair (caricature) by James Gillray; H. Humphrey, published 6 February 1801. Repro ID: PAF3874. Copyright: National Maritime Museum, Greenwich, LondonToday, this is a commonly used phrase to encourage people to get up in the morning or to hurry along generally, but it originated in the Royal Navy. Seamen were not traditionally allowed any shore leave (in case they deserted) and so were allowed to have their wives on board the ship. In the mornings the seamen had to report for duty but the women were allowed to stay in bed. As the mate checked hammocks and bunks for occupants, the women would hang a leg over the side to indicate that they were female and not required for ship's duties, hence the morning call of 'show a leg'.