when to test?

When should I take a pregnancy test? I wake up and pee quite a few time through out the night and I'm not sure if I should test at 5am when I wake up to pee or wait until I get up for the day?