Question: Consider our world at 18-19 centuries. Our civilization knows how to print books, build steam machines, we have made first experiments on electricity. And one day the [Mad God Sheogorath](http://elderscrolls.wikia.com/wiki/Sheogorath) is emerged. He can bend the reality by his will. 

For example, he can violate the principles of conservation of energy - build Perpetuum Mobile just to irritate scientists. 

He can convert Darwin back into the monkey just to help him prove his theory. 

He can make forgery of dinosaur skeletons, so we have found caterpillar riding tankosaurus instead of diplodocus.

He can resurrect people.
And, do a lot of things we are not aware.

So, in potential he can spoil every scientific acquired experiments result in a way, that is hard to see. 

So, the question is: is scientific method still possible in this world?

UPD: after 20 years Sheogorath have just vanished. Can we undo his trickery and restore science methods?

Answer: 
I think you're vastly underestimating just how different a truly non-deterministic universe would be.

**Case A**

If the god's influence is sporadic enough that you can still discern a "default" set of laws that nature follows most of the time, then scientists would simply study those laws.

**Case B**

If the god's influence is *so* omnipresent that you can't discern any underlying patterns at all, then frankly good luck with your story. I don't think the human mind is really capable of imagining a *completely* non-deterministic universe. Everything we take for granted would be gone - things like "objects fall when dropped" and "solid objects can't pass through each other". It's not just that things would have to occasionally behave differently to how we expect them to behave, it's that there could be *no trends whatsoever*. The very notion of causality would be effectively meaningless. And how could life even arise in such a world? In order to justify the existence of humanoid life, you need to assume that on most days, the skeleton can support the muscles, things move when tendons pull them, blood moves when the heart contracts, and so on. But if you assume all that, you're basically already in Case A.

You mention, for instance, that he can resurrect people. But the very fact that this is worthy of mention implies that you're assuming dead people still stay dead *most* of the time. So you're already implicitly in Case A. In order to truly be in Case B, you'd need to be assuming that basically, the concept of death doesn't exist, because "life forms tend to die after a while" is already enough of a pattern to place our universe squarely in Case A.

In conclusion: either you assume this god's influence is small enough that *yes*, the scientific method would still apply, or you set yourself the task of writing a story taking place in a universe so incomprehensibly different to our own that I'm not sure any human reader will be able to follow the thread of the plot. You'd essentially be writing a work of highly experimental surrealist sci-fi.
As a writer and reader, if I'm dealing with a being with what we might call "godlike powers", they still have to operate within a larger reality. For example in your setup, Sheogorath builds a tiny "Perpetual Motion Machine" but is actually cheating because in some mysterious god power way, it is perfectly converting a few molecules of MysteriousInvisibleSubstance to Energy at the nano-level. Maybe there's even enough MysteriousInvisibleSubstance to last a thousand years and it's really really hard to detect. MysteriousInvisibleSubstance can also alter visible reality so that Darwin is now stuck in what appears to be a monkey body. Sheogorath can also in some odd way travel in time and use his nifty MysteriousInvisibleSubstance powered MatterReasssembler to screw with the fossils just to screw with the human's of the future's heads. Then Sheogorath disappears. 

Until the sentients are clever enough to figure out how to detect and then use MysteriousInvisibleSubstance at the molecular level, no "laws of reality" in that fictional world disturbed. That said, for the WorldBuilding exercise to be any fun to read, etc. When the sentients or others of Sheogorath's species figure out what he's been up to and how, Sheogorath is going to be in BIG BIG trouble, right?