Here is the rule;
Cleaving through Creatures
If your player characters regularly fight hordes of lower-level monsters, consider using this optional rule to help speed up such fights.
When a melee attack reduces an undamaged creature to 0 hit points, any excess damage from that attack might carry over to another creature nearby. The attacker targets another creature within reach and, if the original attack roll can hit it, applies any remaining damage to it. If that creature was undamaged and is likewise reduced to 0 hit points, repeat this process, carrying over the remaining damage until there are no valid targets, or until the damage carried over fails to reduce an undamaged creature to 0 hit points.
I like the idea, but have not used it. I might restrict it to fighters and barbarians. I also like
@commandercrud idea about using downtime to learn it.
I also find that most of my table does not deal that much damage to make this that good. Say, at 5th level my group's fighter may deal 10ish points of damage. This is enough to kill a goblin and cleave the extra 3 to a new goblin. A 2nd attack against a new goblin may kill it and then get to cleave the wounded one. We hardly play high level where dealing 30 points would kill 4-5 goblins at a blow.
I do not get the point of having to hit an undamaged creature to cleave through it. I can cleave through a fresh goblin full of P&V, but one barley standing near me on wobbly legs I cannot?