2895th_Dystopian: You are absolutely right, the deeper a layer gets buried, the higher pressure and temperature it is subjected to.
However, there are two ways to explain your question. Compressive tectonic forces can fold or fault rock layers which would place metamorphic rocks above sedimentary rocks.
A thrust fault is a type of fault that pushes deeper, older rocks over younger rocks. Imagine pushing two pieces of paper together on a flat surface. One would slide on top of the other, which is exactly what happens in a thrust fault. There are places in Canada where very old granite has been pushed up on top of young sedimentary rocks via thrust faulting. For the folding example, think about a tablecloth pushed over a smooth table, it would bunch up in a series of small folds. The same thing happens with rock layers. Sometimes rock layers get folded so much they become overturned, which means a “lower” layer would be on top of an “upper” layer.
Ingleeshknigget: You’d be right to think that, but after deposition, and compression in the case of metamorphic rocks, the units can be overturned in folding. You’ll have a large scale fold (across miles) which has been folded even further over so that the peak of the fold lies on top of another fold limb, and one of the limbs will be upside down relative to it’s original orientation. You then see the upside down beds at the surface when the fold and overlying beds have been eroded away. Hope I haven’t been confusing
brucesalem: A sill of intrusive igneous melt could be implaced in flat lying sediments which could cook the contact area but leave rocks down section unchanged. I saw talc as the metamorphic mineral in a contact zone around a basalt sill into limestone.
I can also imagine blueschist facies metamorphism into sediment beneath a thrust where there are sediments that are much less altered beneath them. The difference is that such metamorphism is due to tectonic over pressure rather than heating or depth of burial.