Two humanitarian rescue ships pulled 394 migrants from a dangerously overcrowded wooden boat in the Mediterranean overnight on Sunday in an operation lasting about six hours, a Reuters witness said.