In data aggregation networks (WSNs, ad hoc, mesh, etc., it is key to schedule the network resources, such as channels and TDMA time slots, to minimize the communication conflict and optimize the network data-gathering performance. In this paper, the resources scheduling problem is formulated as a vertex coloring problem in graph theory. Then, a multi-channel TDMA scheduling algorithm based on the Gibbs optimization is proposed. By defining the Gibbs energy expression according to the objective function of the problem, the joint probability of channel and time slot can be computed for the optimized selection of channels and time slots. This algorithm is low-complexity and its convergence performance can be proven. Experiments with different network parameters demonstrate that the proposed algorithm can reduce the communication conflict, improve the network throughput, and effectively reduce the network transmission delay and scheduling length for the data aggregation networks.