I broke this out into another thread...
Like many answers here, it all depends on the policies of the ship, department, and division. Obviously, this is a surface answer...
I have had Reactor Officers who would wait until 12 hours prior to underway to start up, and I have had one who wanted to be critical and ready to roll 24 hours prior to pulling out. Generally, the more comfortable the RO is with the competency of the department, the later he (or she) will delay startup. So, that means that Rx Department watchteams must be manned up and ready to go prior to startup. However, most departments I have seen will allow "watchstanders' liberty" (you can leave as long as you don't have watch) on the day prior to underway. Liberty for the entire crew will usually expire the night before an early morning underway, or 4 hours before a late morning or afternoon underway. Again, this is the CO's call, and it may depend on if the crew has shown that they can show up on time for underways.
When it comes to pulling in and shutting down, when you leave the ship will be determined more by your divisional chain of command. Some divisions just allow the "on watch" watchteam to shut the plant down while everyone else gets off the ship at "liberty call". Other divisions, usually the MMs, will require that all off watch personnel come down and help shut the plant down, then everyone (except duty folks) goes home at the same time.
Let me clear up a misconception here...no one gets off the ship for liberty as soon as it ties up to the pier. A crane must lower a brow, usually the officer's brow first. Essential personnel are then allowed to go ashore and assist with connecting services, etc. Liberty call for the crew is typically 1-1.5 hours after pull-in. In my experience, it can be an excruciatingly long time to sit around and wait to leave. At least if I am shutting the plant down, I am busy. Also, liberty is called by rank from the top down, starting with the officers, Chiefs, E6, E5, etc in descending order. There is generally a big logjam at the quarterdeck, so waiting an extra few minutes will ensure that you avoid this clusterf#$% at the brow.
Are you first on, last off? Maybe, but usually only a few hours either way if at all.
Of course, YMMV...
Taylor