Why does dropping my laptop's AC adapter in the floor make it work again?
There must be a solder joint of a component which is broken. A mechanical shock moves the component and it makes contact again. That could be a fire hazard, not to mention more components coming loose in their solder joints due to all the mechanical shocks. Please buy a new adapter.