It might seem like a very difficult thing to do, but restrain yourself. Although it is very unlikely, there is still the slightest chance that your loved one could die in a tragic accident en route to their destination. In such cases, some family members have reported spiritual (paranormal) activity coinciding at the time of death of their loved ones involved in traumatic accidents. This includes phantom phone calls, cool breezes, and sometimes even spectral appearances.
That being the case, not going to the bathroom or having sex at the time of your loved one's death affords his or her spirit a better chance to visit you one last time as a ghost. Given that not much is known about the afterlife, it is possible that there is only a very brief window of opportunity in which they can appear to you. Generally, people try to avoid encounters in uncomfortable situations, and with the dead, as former people, it can be assumed that they, too, would also do so. Therefore it would be prudent to spend a minimal amount of time engaging in private activities in order to maximize the opportunity for your deceased loved one to visit you. I am sure that you would feel deep regret if you learned that your loved one accidentally died while you were dropping a load, as clearly your loved one, rather than shock and embarrass you in your state, opted instead to continue with his or her trip.
So if you can manage it, avoiding physical urges could mean one more chance for a dearly deceased friend or relative to offer one last goodbye and farewell as they move on to the next plane of existence. And something like that really shouldn't be missed.