The simplest solution would be to apply the existing fatwa of 2007, which was a response to Sheikh Muszaphar Shukor's flight on the ISS. The practical problem is that although the direction of the Kaaba relative to the ISS is (obviously) accurately known, the direction many be changing too fast to obey the traditional directions for prayer.
Several Muslims had flown to space before Sheikh Muszaphar, but none of them had publicly raised the issue of the direction of prayer.
The fatwa provided four options in order of priority:
- Towards the Kaaba itself
- Towards the position directly above the Kaaba at the altitude of the astronaut's orbit
- Towards the Earth in general
- Towards "wherever."
Clearly option 4 is always applicable!