What OS?
You mention "plugged in" - is the secondary SSD actually installed in the laptop or is it in an external case that you plug in (USB) when you get to your next class?
And the reason for sleep/hibernate is to save battery power - correct?
If so, as an opening thought, consider that there may be a loose connection that once warmed up expands and tightens up.
The more distance/time between classes allows the laptop to cool with some dependency on ambient temperatures etc..
Experiment a bit by temporarily disabling sleep/hibernate for a couple of days to determine if the secondary SSD continues to disappear. Be aware of "temperatures".
Windows: Look in Reliability History/Monitor for any error codes, warnings, or informational events that relate to disk drive(s) and/or other times just before or at the time the SSD has gone missing.
The SSD is plugged into the motherboard, on the previously empty M.2 slot, not an external connection.
The reason for sleep is not actually to save power (with the right configuration the battery actually goes around 7 hours or so), but to move around classes, because there's 30 minute intermissions (and usually some distance) between each class, so I like the convenience of not shutting down altogether and being able to continue where I was left.
For temperatures, I don't think there is any difference. I have done the hibernate in/out in outside (currently 4 C), inside (around 20) and in between. The odd thing is that the disconnect happens around 5-10 minutes into the sleep, if I close the lid (set to hibernate on battery and sleep when plugged in), wait a minute or two and boot it back up, the disk is there. If I wait longer, disk is gone.
I should also mention that this never is the case in normal working conditions - I have never had it disconnect while running at any load, or after a proper shutdown and reboot. And a reboot *always* fixes it, so I am banking on a software side issue.
I don't have the device open right now, but I will check the event logs.