I have a question pertaining to Judaism and space travel. If humans ever colonize the moon or other planets, then which direction would we face while praying?
The Aish Rabbi Replies:
Our Sages taught: "A blind man, or someone who cannot tell which direction he is facing, should direct his heart toward God in Heaven. If one is standing outside of the Land of Israel, he should turn toward Israel. If he is standing in Israel, he should turn toward Jerusalem. If he is standing in Jerusalem, he should turn towards the Temple..." (Talmud Brachot 30a)
Although the Talmud does not directly address your issue, it is logical that the space traveler should face toward Earth. If, however, he were in a black hole, then he would be exempt from praying because of the grave danger. The same would be true if space aliens were attacking him.
By the way, keeping time in outer space - for the purpose of Shabbat, etc. – is quite difficult, given that an orbiting spacecraft may see sunrise many times each day. So for astronauts, time should be kept according to the "home base" on planet Earth.