Why yo feel useless? If she has a sickness it is not your fault for sure. Beside, you noticed it and brought her to the doctor and bought medicines for her. It is good to have recogized so she can start antibiotics soon if she needs it, and in case of bacterial infection the sooner the better.
Could it be antibiotic that impacts sleep tonight? I know it can give little disturbance. Also, you are doing your best and if she has changed her sleep pattern is not certainly your fault. You need time to find the right new routine, if a new one is needed. We are all doing our best. No more, no less.