At that moment, Ron was hungry.
On a dare from Dean, he'd went without eating Breakfast, Lunch, or Dinner.
Dean would pay. Sometime soon.
The redheaded Weasley (you know, if there was a Weasley child that wasn't redheaded, well, consider it the apocalypse)
The inner beast inside of his stomach roared with the fury of a thousand dragons on steroids.
He turned in his bed, and pulled the covers over himself, but the hunger just kept gnawing away at his intestines, and finally...
"I can't take this any more!"
He kicked off his blanket, and with everyone else asleep, pushed open the Fat Lady against her will, stomping angrily.
Since it was very late at night and he was tired, and since had no particular goal other than the acquiring of food, he basically wandered without direction.
Somehow he made it to the Mirror of Erised. Don't ask how, don't think too much about it, just accept it.
The Mirror of Erised shows your most deepest, your most precious desire.
So to any outsider, it would've been a surprise to find that what Ron saw at that moment was a giant, juicy McWhopper, in all it's greasy goodness. Drool leaked from his sleepy face as he stared at the burger with lust in his eyes, and eventually couldn't resist charging head on the mirror, and breaking the magical artifact and at the same time guaranteeing a visit to Nurse Pomfrey.
Crack. Don't even know.