How holes and electrons in the diode gets back to their original position when it is turned off?
The key here is the generation/recombination of the carriers (electrons/holes).  Electrons and holes are constantly generated and recombine.  Only when one of these processes overcomes the other is there an excess or lack of carriers relative to the steady state.  This happens for example in the diode when a bias is applied, because the carriers can be swept away before they recombine.

Consider just the case of forward bias.  There is an excess of holes in the P region and electrons in the N region.  The diffusion force of these local high carrier densities combined with the applied voltage (overcoming the built in voltage preventing migration) sweep the carriers from where they were generated across the depletion region.  Here they quickly recombine (since the area is highly favorable for recombination: a lone electron in a sea of holes).

Once the voltage is removed, the majority of the carriers would not 'go back'.  Instead those that were in a locally unstable place (now that the voltage is removed) would recombine in that area, after spreading out a bit.  Likewise the areas that were missing some carriers, relative to their steady state, would generate them through the normal methods.  

However, there would be some carriers that moved away once the voltage is removed.  This is due to diffusion.  If a region has a locally high number of carriers, those carriers want to spread out.  This is called diffusion and is the same reason why if you spray perfume in the corner of a room it eventually spreads out to the whole room.  How far these carriers got, however, is related to how pure the nearby silicon is.  If this area has very few impurities, the carriers may move a fair bit before finding an opposite carrier or charged dopant ion to recombine with.

Those carriers traveling through the depletion region would suddenly lose the electric field guiding them, and would also recombine.