I'm sorry this is happening to your baby! So strange and confusing. Dogs baffle me sometimes! So, this follows a pattern. I'd look for a further pattern . . . happens after a long time when he is outside, happens when he is digging in the left corner, or whatever. Kind of be watchful of his/her actions outside.
A seizure could have rigidity but there are a lot more common things that happen.
Could your dog's blood sugar go low? That can cause rigidity and eye glassiness and changes?