That one was actually easier for me than the stuck in the chapel dragon. basically try to stay on the pillar walkway as long as you can shooting bullets at him until he knocks the pillar down, if the bottom is still lava-e get the glass and restore the pillar as soon as possible.
Not sure what causes the ground to become solid, but after a while it does, and thats when you can really pound him. When the ground becomes solid get down there ASAP and avoid his attacks, one of the attacks he will get his heads stuck in the ground, try to use as much combos as you can. When he flies up high you need to jump close to the hour glass, and the game will tell you to jump (you will automatically jump 3 or 4 stones) all the way up to dragon to use a megaton combo where you will rip one head off, rinse and repeat. Hope this helps ^^; basically the key is to stay on that pillar bridge until the ground becomes solid, and I wasn't sure what made it but waiting it out and dodging his attacks until then.
<3 Bayonetta <3