Did you know that Firefox has this cool new option (spoiler: it's not new), that lets you bookmark websites into folders and when you click on that folder from your toolbar it says "Open All in Tabs" at the bottom of the list. BAM! Tabs restored.
You could also tie this folder and command into a Terminal command in Linux, so you could just type "psychosis" and it will open Firefox with 7,470 tabs open if you'd like.
I'm sure this will cause your laptop to explode, but that's a downstream issue.