When sneaking around at night, you need to get by many of the prefects. When you need to get by them, simply crawl under the bookcase to the left of the portrait that leads to the Griffondore common room. It leads through a secret passage that takes you to the fourth floor.
When sneaking around and you do not want to walk slowly, you can use various objects and spells to distract the prefects. Stink Pellets are not too reliable, but the non-explodable luminous balloons work well. As for spells, try Flapendo.
Sometimes, very rarely, you can press R1 to "take aim" then press X to dodge. The uppergraders will just stare at you and say "Hey you!". You have to do this repeatedly, pressing it continuously. Note: This may get annoying -- you have to press the Left Analog-stick, and you walk sideways.
On your night time errands, you can take a quicker route down the floors. When you come out the Fat Lady portrait, turn right. Walk along the nearest bookshelf until prompted to crawl with X. Do this, then follow the path. Sometimes when going down the stairs after the basilisk (and just before; the same night) has attacked, you can hear it speaking. Also, when you are at the Weasley's house, to get the card on the ledge in the barn, climb up from the hen house near the washing machine once you have killed it.