How does Loki regain the Scepter on the helicarrier? It was in the lab and then he had it to kill Agent Coulson just as he was freed?
There doesn’t appear to be a definitive answer to this, however, in the whole scene Loki is using his illusions to trick people. Firstly, he tricks Thor that he is only just being released to capture Thor into the cell. Then he uses one again to trick Coulson as to his location to sneak up behind him for the stabbing.
This means that his appearance up until the stabbing is never really true and so he might have always been somewhere else with the Scepter. Or he could have just been completely hiding the Scepter from view so others couldn’t see it.
It’s also worth noting that as we don’t see Loki being released the soldier that released him could, and most likely did, have brought the Scepter to him and the illusions began as Thor entered. Note that the Scepter was loose on the lab table when that room is blown up. As such it was free for anyone, including the controlled soldiers, to come and get it.