Can't be sure, but it was most likely your fill valve, which opens to allow water to refill the tank after each flush.
The cause could be a bit more elusive. Sometimes, not having the valve for the water supply at the wall open all the way can cause something like this. Sometimes, it's water pressure that's too high. Sometimes, some bit of crud may have lodged in an important area of the valve and cause the vibration. There are other possibilities as well, depending upon the valve type.
I had a similar experience with the valve on my toilet, starting a few weeks after it was installed. It was intermittent, but I just swapped the valve for a brand I preferred and it solved the problem.
That your problem disappeared could indicate that whatever it was has resolved itself for now. If you don't have any symptoms at the moment, I would say, "It ain't broke, so don't try to fix it."
If it recurs, come back to us with more information about the type of toilet and valve, and we can give you some advice about maybe cleaning it or, if necessary, replacing it, which is almost always about a ten-minute job.