Out-of-body experiences (OBEs) are illusions, where people experience themselves as being located outside their physical body and often flying or floating at an elevated location. Here, we propose that the flying and floating in OBEs can be explained as the result of a Bayesian inference, where ambiguous bottom-up signals from the otholiths in a supine position are integrated with a top-down prior for the upright position, which is not appropriate for the current supine position. We also measure these ecologically valid priors for the upright position as the empirical probabilities in natural head movements. Our results suggest a simple interpretation of some aspects of OBEs in terms of a mislead sensory inference and suggests new ways of experimentally inducing OBE-like experiences by manipulating sensory signals and top-down prior information.