לע"נ אסתר בת חנה
חנה בת ר' יצחק יונה
There are different opinions as to how long one has to make אשר יצר after relieving himself. Bottom line is that you have until the next time you have to go. BUT - ideally, one should make the bracha immediately. Imagine you were feeling tremendous discomfort and a doctor came and performed an operation that was free and painless. You would surely thank him promptly!
If you wouldn't be able to relieve yourself, you would experience TREMEMNDOUS discomfort. Hashem does a free, undeserved chesed and relieves us of our discomfort in a painless easy way. We should JUMP to thank Him and with DVEYKUS!!!
Same with bentching. We have a certain amount of time to bentch after finishing eating but ideally one should bentch right away in recognition of the TREMENDOUS chesed Hashem performs for us. If not for food we would starve to death in a painful way. Not only do we have food but it is tasty and pleasurable and gives us energy and life. Of course we should jump to thank Hashem at the first opportunity!! And with joy and rapture!!:-)
[עפ"י ואני תפילה עמ' ב-ג]