She lay down on the grass.

Literal

She [topic-は] grass [genitive-の] top [on-に] lay-down.

横になる is the standard idiom for 'lie down' — literally 'become horizontal.' Built from 横 ('side, horizontal') + に + なる ('become'), riding on the productive ~になる ('become X') frame. 草の上 uses the locative noun 上 ('top, above') with の to make 'on the grass.' に marks the location/destination of the lying-down action.