Assigning network addresses to nodes in a wireless sensor network is a crucial task that has implications for the functionality, scalability, and performance of the network. Since sensor nodes generally have scarce resources, the address assignment scheme must be efficient in terms of communications and storage. Most addressing schemes reported in literature or employed in standard specifications have weak aspects. In this paper, a distributed addressing scheme has been proposed that first organizes the raw address space into a regular structure and then maps it into a logical tree structure that is subsequently used to assign addresses in a distributed but conflict-free manner. As an additional benefit, this approach allows underlying tree structure to be used for default routing mechanism in the network, thus, avoiding costly route discovery mechanisms.