first morning urine?

Erica
When you take a pregnancy test I know it's best to take it w/ first morning urine. Does this include if you have to pee in the middle of the night? Last time I peed in the middle of the night then took the test it was negative. Could this have some effect on the result? Help please!