Some extrasolar giant planets in close orbits— “ hot Jupiters ” —exhibit larger radii than that of a passively cooling planet . The extreme irradiation L _ { eq } these hot Jupiters receive from their close in stars creates a thick isothermal layer in their envelopes , which slows down their convective cooling , allowing them to retain their inflated size for longer . This is yet insufficient to explain the observed sizes of the most inflated planets . Some models invoke an additional power source , deposited deep in the planet ’ s envelope . Here we present an analytical model for the cooling of such irradiated , and internally heated gas giants . We show that a power source L _ { dep } , deposited at an optical depth \tau _ { dep } , creates an exterior convective region , between optical depths L _ { eq } / L _ { dep } and \tau _ { dep } , beyond which a thicker isothermal layer exists , which in extreme cases may extend to the center of the planet . This convective layer , which occurs only for L _ { dep } \tau _ { dep } > L _ { eq } , further delays the cooling of the planet . Such a planet is equivalent to a planet irradiated with L _ { eq } \left ( 1 + L _ { dep } \tau _ { dep } / L _ { eq } \right ) ^ { \beta } , where \beta \approx 0.35 is an effective power-law index describing the radiative energy density as function of the optical depth for a convective planet U \propto \tau ^ { \beta } . Our simple analytical model reproduces the main trends found in previous numerical works , and provides an intuitive understanding . We derive scaling laws for the cooling rate of the planet , its central temperature , and radius . These scaling laws can be used to estimate the effects of tidal or Ohmic dissipation , wind shocks , or any other mechanism involving energy deposition , on sizes of hot Jupiters .