Vac it, as per Kno4te.
Alt.: give it a stir with a stick every couple of weeks to shake the bubbles out.
Alt: when you put water back in after water-change - splash it harder than normal so it gets into the bottom, or use a hose. It doesn't take much to shift.
Alt.: MTS and/or loaches and/or eartheaters will keep it moving and/or stirred. Younger eels that self-bury, also. Cichlids like to dig & landscape, also.
Alt.: feed live tubifex & actively bury a few into the bottom where they'll do their thing, including making passages for methane to move/escape. There are other FW/underwater worms, too. Cali Red-Wrigglers are pretty drown-tolerant if I remember correctly.
Alt.: rooted plants should put O2 into the dirt, which may keep methane from forming in a problematic way... somebody please correct me if that's not correct.
Yes, shallower sand will breath & shift better than deeper, which may also compact & layer.