There's many reasons why a dog can have a seizure. It could be genetic. It could be a reaction to some flea &tick preventative or some medication. It could even be a reaction to some other underlying condition. Take the dog to the vet.
A seizure or a puppy dream? My Siberian husky is 13 and still has puppy dreams.
Here are some websites that might be helpful to you: I hope these links are helpful!