Harry had already pretended to go up to his dormitory, yawning widely. Once there, he charmed a pair of pyjamas to look more bulky, and transfigured a pillow into the shape of his face. Putting on his Invisibility cloak, he came back downstairs.