We have investigated theoretically the thermoelectric effects in wurtzite GaN crystals and AlxGa1-xN alloys. The electron-transport model includes all dominant energy-dependent electron-scattering mechanisms, such as charged dislocation and ionized impurity scattering, polar optical phonon, deformation potential, and piezoelectric acoustic-phonon scattering. The results of the calculation show that GaN-based alloys may have some potential as thermoelectric materials at high temperature. It was found that the thermoelectric figure-of-merit for bulk GaN at T=300 K is about 0.0017 while it can reach 0.2 in the thermally resistive Al0.4Ga0.6N alloy at T=1000 K. The obtained results agree well with available experimental data. The developed calculation procedure can be used for the optimization of the thermoelectric properties of GaN alloys. The proposed integration of the GaN high-power microwave and optoelectronic devices with the active thermoelectric cooling implemented on the same material system can improve the device performance.