The nightmares kept creeping back in a new, more elaborate way. They were getting too real to handle alone. So Hermione would much rather prefer staying up for long as possible, to exhaust her body so it would keep her from dreaming at all.