The upside down trick is legitimate but not for this situation.
If you on a trail and sink your bike underwater, in a creek or something, you can remove the fuel tank, remove the spark plug, tip the bike upside down and kick it over to get the water out of the engine.