Crawl in the book with torch, look were the catch is and you should see a small slot, with a small flat screw driver through that and moving it up or down cant remember which you should be able to open it, you will then have to take the back off the lid and find the problem, could be water in the works just need some wd40 or some such or a burnt out motor, if its the motor you may have to buy the completer lock if you cant find a motor you may find one on Evil Bay or a model shop depending on the motor fitted.
Mine wouldn't open because the switch that you use to open the boot was broken. Water tends to get into the switches and corrode them. I pulled mine out and replaced it with a new one and now my boot opens fine. :d
Water ingress seems to be common with the Megane.
Leave the car a few hours in a dry spot, and try again.
Once you can open it, unscrew the inside panel of the bootlid, so that you can access the lock mechanism.
I'd recommend not using WD40 for the corrosion cleanup, but instead use contact cleaner (which you can get from the likes of Maplin).
Once corrosion and stuff are cleaned up, plug it back together, and seal off the connector with a bit of non-acidic vaseline.
It has never happened to me, but I still take the precautions driving school taught me, so it's become sorta second nature:
1) When parking on an incline, always park with the wheels facing towards the curb (downhill) or away from the curb (uphill).
2) Put the car in 1st gear (or P if automatic), and let it rest on the gear/parking pawl before you apply the parking brake.
One advantage to precaution #2 is that there's less wear on the parking brake,
and the gearboxes on modern cars are built on purpose to handle this parking method.
On cars from the 70's or older, I was advised to apply the handbrake before putting the car in gear.
Not sure what the driving schools in UK teach about this bit, but you might find something useful here to prevent this from happening to your next car.