It could be epilepsy, but the fact that, from the way you mentioned it, the head banging somewhat woke you up does not point toward a
seizure because usually when you come out of a
seizure, you are confused, extremely tired, and sore. Also, you wouldn't be able to be woken up from the head banging. Although, the fact that the shower nob held up your head by hair would be suspicious of something more than fainting...