Jars do preserves... jars do preserve your bedside snacks. Just another one of those simple ideas that make life happier.
Acquire a ridiculously oversized glass jar for which you can think of no good purpose (beware: plenty good purposes do exist).
Add your favorite soft-packaged food stuffs. Qualifying items include anything you don't want your roommates to have easy access to, anything you know you'll crave during a productive locked-down study session, or anything you want access to when you are feeling exceptionally lazy. It is not necessary for items to be properly sealed.
Close jar and position according to desired level of access until the next snacking session. Rest assured that items will stay fresh and unbothered by critters.
Decorate to taste. I happen to like the old-timey jar feel, but we wouldn't want it to be out of place.