Yes it is possible for dogs to die in their sleep just like humans can die in their sleep.
A dog could have an illness and then go to sleep and the illness kill the dog before it wakes up so in that way the dog can die when sleeping.
A dog can also have a heart attack while sleeping and even a silent heart attack and if the dog dies in their sleep they will usually die with their eyes closed and not open.
When a dog happens to die when awake their eyes will almost always be open because they cannot close their eyes due to the loss of muscle function that is required to close their eyes.
That's one reason dogs die with their eyes open when they are awake and die.