My ankle does the exact same. My understanding is that for this sort of cracking, where there is no "refractory period" between cracks, the gas bubble thing is not the cause. Rather it might be a tendon "snapping" across a bone, like some sort of bistable system.
I also have another sort of cracking where the refractory period is weeks, rather than ~20 minutes. I suspect this is another phenomenon as well, though I don't know what it might be. I experience this in my wrists, sometimes sternum (perhaps snapping cartilage in the xiphoid process? I really try to avoid this one.)
My elbows also crack when I hyperextend them. The refractory period there is probably somewhere between 20 minutes and an hour, but I'm not convinced that is the gas bubble thing either.
I also have another sort of cracking where the refractory period is weeks, rather than ~20 minutes. I suspect this is another phenomenon as well, though I don't know what it might be. I experience this in my wrists, sometimes sternum (perhaps snapping cartilage in the xiphoid process? I really try to avoid this one.)
My elbows also crack when I hyperextend them. The refractory period there is probably somewhere between 20 minutes and an hour, but I'm not convinced that is the gas bubble thing either.