In this paper, a cross-layer framework for joint distributed spectrum sensing, estimation and scheduling in agile wireless networks is presented. A network of secondary users (SUs) opportunistically accesses portions of the spectrum left unused by a network of licensed primary users (PUs). A central controller (CC) schedules the spectrum bands detected as idle for access by the SUs, based on compressed measurements acquired by the SUs and local feedback information from the PUs. The sparsity in the spectrum occupancy dynamics is exploited: leveraging the spectrum occupancy estimate in the previous slot, the CC needs to estimate only a residual uncertainty vector via sparse recovery techniques, thus few measurements suffice. The sensing probability of the SUs and the spectrum scheduling are adapted over time by the CC, based on the current spectrum occupancy estimate, and jointly optimized so as to maximize the SU throughput, under constraints on the PU throughput degradation and the sensing-transmission cost incurred by the SUs. The high dimensionality of the POMDP formulation is reduced by resorting to a compact state space representation via minimization of the Kullback-Leibler divergence. Simulation results demonstrate improvements up to 70% in the SU throughput over a scheme where sensing is done only locally at the CC, at a fraction of the sensing cost with respect to a scheme where sensing is done in each slot by the SUs.