Decomposition as noted releases methane. Some landfills gather it in pipes and “flare” it )burn. They have to vent the gas as a full landfill is covered by a plastic cap to prevent water infiltration.
We dug up trash from the 70s to extend the landfill out. It was in remarkably good shape.
Practical Engineering put out an excellent video on landfills a couple years back, well worth the watch for the visualizations alone.
Can useful energy be recovered from this?
In the longer run, when there's been more compaction, settling, and densification (and changes in what things are valuable), and more need to reclaim land that was previously landfilled, we will do this more.
No one was interested in further research.
edit: I see some research is now happening.
St. Lucie County wanted to use a plasma torch that would have converted plastic and other carboniferous waste to energy. Like many other plans to do the same, it fell through
In a more civilized civilization we'd be investing in making these processes work. Likely there was more money to be made by stakeholders to scuttle these endeavors.
I've seen compost vending machines in my visits to NYC and a few other places, but i've yet anyone using them
Also a scam.
There's no grossness or work involved. You just dump stuff in it and it cooks it down to something dirt-like(nearly but not quite compost ready) in less than a day.
I have municipal compost, but it's only picked up every 2 weeks, so that meant I needed to keep food scraps around for two weeks before pick up, so they either would get super gross and smelly, or I had to use my chest freezer to store them and make that gross and smelly and dedicated to just compost.