At the heart of the question is: Were these 'Trees' actual trees, and if not, what is the significance of them?
Since there is no tree in nature that can give one "life", nor is there a tree that in itself can confer knowledge. Augustine, in City of God(XII:20) says,
the tree of life is the holy of holies, Christ; the tree of the
knowledge of good and evil, the will's free choice.
He further says it is not a mere allegory, but a historical event; but one can understand these truths figuratively, has opposed to literally.
If Christ therefore, is the Tree of Life, which if one 'partakes' in an ongoing relationship, will live forever, what is the Tree of the Knowledge of Good and Evil? As Augustine mentioned, the "will" that opposes Christ; infused by "knowledge" that may appear beneficial or detrimental, but both are forbidden by God.
It is my contention that this "Tree", the one 'tree' that Satan had access to, and with it access to man, although allowed by God, was one of Satan's 'creation', it offered a "false life" to man through the knowledge that Satan had acquired by being an angel of light(Lucifer) and would make man a 'co-conspiritor'(becoming like us(elohim) knowing good and evil-Gen 3:5). Since God Himself is not the Author of evil(He is All-Good), to have a 'tree' in which evil is present is not of His Making. The evidence of the fruit of this tree is "nakedness", when one acquires knowledge apart from God, one is "naked" from the Presense of God; totally contradictory from the Tree of Life, in which the individual who 'eats of Christ', becomes in time "embued with Him" and lives forever.
I am the living bread which came down from heaven: if any man eat of
this bread, he shall live for ever: and the bread that I will give is
my flesh, which I will give for the life of the world.(John 6:51)
And to those who struggle with this statement, He says,
It is the spirit that quickeneth; the flesh profiteth nothing: the
words that I speak unto you, they are spirit, and they are life.(John 6:63)
To answer the question: There is no commandment about eating from the Tree of Life, in fact that's the choice that they(and all men) are to make. The "Tree of Life" was withheld from them because one cannot actively partake of sin, and eat from the Tree of Life.
Ye cannot drink the cup of the Lord, and the cup of devils: ye cannot
be partakers of the Lord's table, and of the table of devils.(1 Cor. 10:21)
Those that are Christ's are freely given to eat from the Tree of Life; it was(and is) God's Plan and Purpose that they do so. God "allowed" the Tree of the Knowledge of Good and Evil-Satan's 'tree', to give man a choice and allow man to exercise his will; would he choose Christ and live forever, or choose Satan and die forever?