Hi....as flipper mentioned we can not tell you what caused it...only speculate on several possibilities...
Look to family medical history...keep a journal and see your Dr for testing....there are many things that can cause you to pass out....and to add to the few things mentioned above...POTS is another possible reason...as heat from a very warm/hot shower can affect one to the point of passing out.
See your Dr ...talk to family members and keep us posted on what you find out.
Good luck.
I am sorry to say that no will be able to tell you why you passed out until you see a doctor and have some tests done. There is just to many reasons for why someone will go out. Low blood sugar, seizures, drop in blood pressure (syncope) and heart problems just to name a few. So if you are concerned make an appointment with your family doctor and just go from there.
Best of Luck