I've learnt that these king of subordinate clauses can be used to
-talk about something that takes place at the same time as,or just before, the action in the main clause
-talk about causes/rtesults of the action described in the main clause
I've posted this question to know in which "category" this sentence could be included.
Without a comma, "hitting my head" seems misplaced, as if it should modify "floor" (e.g. "the floor hitting my head" = "the floor that hits my head").
With a comma between floor and hitting, the sentence is ambiguous. Most likely the head was injured upon hitting the floor (not hitting something else on the way down), so the two meanings will probably coincide.