If this happens again, is there a way to encourage it to get into gear?
A quick googling suggests it could be a brake sensor malfunction, so that it doesn't 'know' that my foot is on the brake, and so park dosn't disengage. On a Mercedes forum, they spoke of fiddling with a screw to fix it; mine's a Galaxy, not a Merc, so where might such a sensor control be?