How does Huck end up with a nice loaf of bread? What does he mean when he says there's something to praying, "but it don't work for me"?
The second part of your question concerns Huck's own spirituality. He is agnostic, meaning he doesn't know if there is or isn't a god; for him praying just doesn't connect him in any way. But the really important part here is that Huck doesn't try to foist his views on others. If it works for them, fine. Unlike others he encounters, Huck does not try to press faith or prayer on anyone.
The search party filled the bread filled with mercury in the hopes that it would be attracted to his "dead" body, so Huck scoops one up.