Physical layer security has recently attracted an increasing attention in wireless networks. While existing work on physical layer security focuses on the information theoretic aspects, this paper studies the impact of the presence of eavesdroppers on the topology and dynamics of wireless multi-hop networks. In this context, we investigate the problem of the distributed formation of a hierarchical tree topology among a number of nodes that seek to send data in the uplink to a central base station through multi-hop in the presence of multiple eavesdroppers. We model the problem as a network formation game where the nodes engage in pairwise negotiations to form the path that connects them to the central base station, while maximizing their utility in terms of the minimum secrecy capacity achieved. For forming the topology, we propose a myopic best response algorithm that enables the wireless nodes to self-organize into a Nash tree structure. Simulation results show that the proposed algorithm presents significant gains in terms of average achieved expected utility per node compared to a best-neighbor algorithm.