The overturn switch is a safety device so the engine does not run if the bike is on its side (and oil would not circulate properly). I don't actually know how the Fazer one works, but some are just a ball bearing or other weight that if not upright will cut the bike out. It is this that can just stick in the wrong place, so a few taps of the box with a hammer may sort the problem out (don't smash the box, just gentle taps on all sides - or even take it off and shake it as it is only held on with 2 screws, but replace the right way up!). Also check the wiring going to/from the box.
the pic is the same as the one i have just taken
I keep such pictures on my phone in case of situations just like this
(OK, I had not deleted it since I replaced the undertray and took the picutres so I could work out where everything went when re-assembling - although I would like to point out that I have now tidied up the wiring).