How closely does it need to be reproduced? For example does the previous command output have to be brought back? If you were in the middle of debugging something, does the program state need to be recreated and the restoration leaves you ready to pick up where you left off?
Mathworks does not provide any tools able to save everything about a MATLAB session for later restoration. (It can be especially difficult to save and restore the state of files that are in use.)
Is your purpose to be able to save the state of a calculation so that it can be restarted from its last "checkpoint" ?