We have derived an analytic form of the thickness redistribution function, Ψ, and compressive strength of sea ice using variational principles. By using the technique of coarse‐graining vertical sea ice deformation, or ridging, in the momentum equation of the pack, we isolate frictional energy loss from potential energy gain in the collision of floes. The method accounts for macroporosity of ridge rubble, ϕR, and by including this in the state space of the pack, we expand the sea ice thickness distribution, g(h), to a bivariate distribution, g(h,ϕR). The effect of macroporosity is for the first time included in the large‐scale mass conservation and momentum equations of frozen oceans. We make assumptions that have simplified the problem, such as treating sea ice as a granular material in ridges, and assuming that bending moments associated with ridging are perturbations around an isostatic state. Regardless of these simplifications, the coarse‐grained ridge model is highly predictive of macroporosity and ridge shape. By ensuring that vertical sea ice deformation observes a variational principle both at the scale of individual ridges and over the pack as a whole, we can predict distributions of ridge shapes using equations that can be solved in Earth system models. Our method also offers the possibility of more accurate derivations of sea ice thickness from ice freeboard measured by space‐borne altimeters over polar oceans.