standing on the sterncastle deck , his hands on the rail as we stood assembled on the quarter-deck , main deck and forecastle , warning us that any man who fell asleep on duty would be tarred and feathered .