The performance of wireless sensor network applications is typically a function of the amount of data collected by the individual sensors and delivered to a set of sinks through multi-hop routing within the network. However, the energyconstrained nature of the nodes limits the operational lifetime of the network since energy is dissipated both in sensing and in communicating data across the network. There is thus an inherent trade-off in simultaneously maximizing the application performance (characterized here by a network utility function) and the network lifetime. In this paper, we characterize this trade-off by considering a cross-layer design problem in a wireless sensor network with orthogonal link transmissions. We compute an optimal set of source rates, network flows, and radio resources at the transport, network, and radio resource layers respectively, while jointly maximizing the network utility and lifetime. Through the framework of "layering as optimization decomposition", we show that the cross-layer optimization problem decomposes both horizontally (across nodes) and vertically (across different layers in the protocol stack) into simpler subproblems allowing a fully distributed solution.