UTI or Pregnancy?

Can anyone tell me if UTIs tend to flare up more at night when laying down? Every night for the past week or so my back has been hurting so bad at night. I'm not sure if I have a UTI or if its just pregnancy aches ( I'm 9 weeks pregnant)

I've also had frequent urination, but again, could be a pregnancy symptom. I never had any back pain with my first pregnancy, so this is new to me. Thanks!