In this paper, we address the problems of joint design for channel selection, medium access control (MAC), signal input control, and power control with cooperative communication, which can achieve tradeoff between optimal signal control and power control in wireless sensor networks (WSNs). The problems are solved in two steps. Firstly, congestion control and link allocation are separately provided at transport layer and network layer, by supply and demand based on compressed sensing (CS). Secondly, we propose the cross-layer scheme to minimize the power cost of the whole network by a linear optimization problem. Channel selection and power control scheme, using the minimum power cost, are presented at MAC layer and physical layer, respectively. These functions interact through and are regulated by congestion rate so as to achieve a global optimality. Simulation results demonstrate the validity and high performance of the proposed algorithm.