Initially, Saxony was located in the region of modern Lower Saxony, where the Saxons lived. Henry the Lion, Duke of Saxony, was a great rival of the Hohenstaufen Emperors, so once he died his lands got broken up. The western part, where his Welf descendants continued to rule, became the Duchy of Brunswick-Luneburg (Braunschweig-Lüneburg), the bulk of which eventually developed into the electorate/kingdom of Hanover.
The eastern strip along the Elbe maintained the name of Saxony. It broke up into three pieces, from north to south: Saxe-Lauenburg, Anhalt, and Saxe-Wittenberg. Saxe-Wittenberg ended up acknowledged as the successor to Saxony's electoral title. It got inherited by the Wettins, margraves of Meissen, even further up the Elbe. Since Saxe-Wittenberg was the most prestigious part of their domain, they adopted Saxony as the name for their whole realm.
(The Wettins ruled not just the modern state of Saxony, but also Thuringia. In Thuringia, the lands got divided up more thoroughly among cadet lines, leading to such houses as Saxe-Coburg-Gotha, which, reckoning strictly patrilineally, is the most recent reigning house in both Portugal and Britain.)
The northern part of Electoral Saxony / the Kingdom of Saxony got eaten off by Prussia in the nineteenth century, so the state is even farther from its roots than it was before the French Revolution.
At no point during this was the name "Saxony" ever fully divorced from its North Sea coast meaning, so the original region came to be called "Lower Saxony" to differentiate it from the new area for the moniker.