This sounds like some type of seizure, but it is hard to say without seeing it. If it happens again, try to take a video to post here or show to your veterinarian.
This could be a sign of low blood sugar, a liver condition called a liver shunt, or a brief loss of oxygen to the brain
, called syncope.
If he continues to have these episodes, in addition to getting a video, look at his gums while it is happening. If his gums look pale, not a normal bright pink, he may be temporarily not getting oxygen to his brain. This could be from a heart arrhythmia, or other heart problem.
I would also consider doing blood tests to check his liver number, blood sugar, thyroid level, etc.
Let me know what else I can help with or answer.