i was confused about that too and just rewatched that scene.
the bartender gets killed. sam is brought to jail for questioning. jenna comes with a lawyer and the cops let Sam leave. one cop tells another cop to put a tail on him. before sam leaves, he steals the police evidence book and finds out when the bodies were found in the factory. (Sept 19, 2004)
he jumps to the factory, finds the murder room and sees himself in the mirror. that shocks him and he comes back to the current day and wakes up on Jenna's couch. He tries to figure out the pattern of the killer and decides to go back to the factory. That is where the cops arrest him.
so he was arrested in the present day, not during a jump.
sam lead the police to the factory where the bodies were since they were following him.