MJ did this on and off for months.
It was also worse when she was teething
Is it really stinky just of wee - really strong or does it have another odour?
If it is a new really offensive smell (not just concentrated urine - which can be exceptionally bad at times) that you have never smelt before AND the same smell is present during the day, then it could be a urinary tract infection

HTH