Rom 4:15 the law brings about wrath; for where there is no law there is no transgression.
Adam and Eve did not need a command to keep the sabbath. It was not until much latter on when Gods people were stuck in slavery for many years that God had to remind his people of the Sabbath. Much like the bible was not needed before Moses. When Adam and Eve ate of the tree of knowledge of good and evil they did not need a law to know what was good or bad. like I was saying though all those years of slavery made them forget and the first thing God asked them to do was go out in a desert place and keep His Sabbath, king pharaoh did not want them to rest and made them make brick without straw in order to make them work harder. Its is not until the Law was forgotten that God has Moses wright his law on paper.