Time is not important, hehe, the time period you mentioned is only suitable for optometry in the hospital, because optometry takes about one to two hours, and it will not be tested if it is too late.
Poor sleep does not affect the result, because the spasm has been relieved because of mydriasis optometry.
The above answer is probably the answer of the optometrist in the optical shop. Normal hospital optometry needs mydriasis, and optical shops are greedy and quick to check.