Question is, after Grandpa brought it home (presumably to the US, disregarding the location on your avatar), did he register it?
Or, did he keep any paperwork (no matter how insignificant it may look) with the rifle, older revenue stamps, amnesty paperwork?
There would have been several opportunities for him to legally register the rifle prior to 1986. Each was a little different, and each would have resulted in different paperwork/Govt' paper trail, and with some work almost any one of them can be used to make the firearm legal.
Being direct family is somewhat helpful, too.
You can also reach out to the ATF through "council" to research the firearm, though this can be frustratingly tricky as Vets often misnamed the rifles, and the nomenclature may be off on the registration papers, STG, MP, machine pistol, Schmeisser, making it a really slow and vague process, but, it is another avenue to try.
If he smuggled it home and told no one, you're out of luck - the receiver gets blow-torch cut and sold as a $6-7K parts kit.
There is a compartment in the stock, where occasionally paperwork was rolled up and stowed to keep it safely with the rifle.
If it is actually legally registered, or in Germany - ignore the above -