The only way to find the root problem is a necropsy anything else aside from that is just guesses.
When a snake die it should be placed in the fridge and taken to an herp vet to have a necropsy done.
Sometimes animal just die however if it is several of them it's either husbandry issues or something else is going on.