Shusen investigates distributed network optimisation in three types of dynamic WSNs: WSNs powered by time-varying solar energy, WSNs with fluctuating wireless channel quality, and WSNs with mobile relays and mobile sinks. In distributed optimisation, sensor nodes communicate with each other to collaboratively solve the overall network optimisation problem. Realistic models are established for these dynamic WSNs, and efficient distributed algorithms are developed to optimise network performance, including power management, duty cycling, wireless link scheduling, data routing and forwarding, sensing rate control, and network resource allocation and pricing. Considering the limited capacity of typical sensor nodes, this thesis also aims to understand and balance the tradeoff between system performance and complexity, bridging the gap between optimisation theory and practical algorithm design in dynamic WSNs. The proposed algorithms are shown to outperform state-of-the-art schemes through theoretical analysis, simulations, and real testbed experiments.