À peine le temps de dire ouf qu’il est tombé comme une brique sur le lit...
Literally: (He must have been dead tired.) No sooner / Hardly had he said phew than he fell onto the bed like a bag of bricks...
Or, more naturally: He fell onto the bed like a bag of bricks in the twinkling of an eye -- {Implicit: almost as soon as X}
In practice, this hyperbolic expression is used to refer to the extraordinary swiftness of some action. As indicated by the exaggerated "dire ouf {say phew}", the construction "À peine X que Y {Hardly X than Y}" is used purely for hyperbole here (as opposed to its usual usage where you compare two actions having actually taken place, almost one after another).
As another example, to express the idea of "how time flies by", you can say:
Les semaines filent à toute allure. À peine le temps de dire ouf qu'on se retrouve à la fin de la semaine !
- A whole week flies by in no time. You find yourself at the end of the week before you know it.
How is this idea commonly/idiomatically expressed in German? (Not a literal translation of the phrase)