Hilchos Asher Yatzar:
Any time one goes to the restroom (urinating or moving one's bowels), one is obligated to say the bracha of Asher Yatzar, even if it is a minute amount. (SA 7.1/4)
If someone is ill or experiences the urge to use the bathroom again immediately after, they should only recite Asher Yatzar once they feel their bowels are fully cleared. (MB 7.2)
Asher Yatzar can be recited until the person needs to use the bathroom again. If someone forgets to say it after using the bathroom and needs to use it again, they should recite only one blessing to cover both instances. (PM 7.1, MB 7.6, Aruch Hashulchan 7.4)
Upon waking in the morning, recite the Asher Yatzar blessing after using the bathroom. If one slept at night, he should recite the Asher Yatzar blessing even if one did not use the bathroom. (Sleep means at least 30 min after midnight) (Rama 4.1 MB 4.3 Igros Moshe 1.4.1)
After reciting the blessing of Hamapil, one may still recite Asher Yatzar if they use the bathroom. (Shut B'er Moshe 1.63)
One should say "Elokai Neshama" right after Asher Yatzar in the morning. MB 6.12
When saying Elokai Neshama, one should pause between Elokai and Neshama. MB 46.3