If your sprinkler ran through its regularly scheduled programming and then starting over again a second time but shut off on its own at the end of the cycle, you have a programming error.
Most controller have three sets of programming that can have up to six run times each, so it can get pretty confusing if you accidentally get into an alternative program. When set on AUTO/RUN the programs that you have set do not run independently of one another, so if you have a start time of 5am on Tuesday on Program A, but you also have a start time of 5am on Program B they are both going to run, one right after the other.
First check to make sure you controller is on program A. Turn the dial over to set start times and see how many start times you have in there. If it is more than one, change the time to the one that you don't want to 1200am. Between 11:45pm and 12:00 am is the OFF position for start times. If you didn't find your error in program A, toggle it to B, C and so on to check for rouge start times.