might have been a fluke but if it has a colored cap its a test port for fuel pressure it would not really affect anything other than fuel pressure it cant increase pressure so dont know why it started maybe your pump is sticking.
When you pressed the valve did any air come out of it? If you run the fuel tank empty the fuel pump can pump air in to the fuel system. If so you may have let the rest or most of the air out of the system and this allowed the car to start and run. As previously mentioned that valve is for the technition to check the fuel pressure produced by the fuel pump. Also it tells the technition if the pressure is dropping to quickly after the engine is shut off. If the car happened to run out of fuel while running, this is not the recommended way to run a fuel injection car. Some cars have to be bled (removed the air in the lines) in order to be restarted which can cost a few dollars to do. Many cars are not bothered but a few will be. Also running out of fuel is not good on the fuel pumps as the pumps are kept cool by the fuel surrounding them. So when they run out not only do the fuel pump run faster than normal there is nothing to cool it off which can shorten the life of the pump.