If you do it right it will be like growing on top of a
compost pile. But there is a chance it could go anaerobic from using up the oxygen and then you will have a huge problem.
What kind of hay? It could be a nitrogen sink if it is straw or grass hay, but if it is alfalfa or clover there should be plenty of nitrogen.
It will probably break down faster than wood, so it is only a few years before it is completely gone--but you should have good raised beds with better soil.
What is the end goal? If it is annual garden beds, I say go for it and use a broadfork to keep it aerated if needed. If it is perennials and trees, then I would be more hesitant. Trees can have real problems if you put unfinished compost under them and it collapses--it creates a kind of sinkhole or cavern and the tree roots air prune around it.
"You must be the change you want to see in the world." "First they ignore you, then they laugh at you, then they fight you, then you win." --Mahatma Gandhi
"Preach the Gospel always, and if necessary, use words." --Francis of Assisi.
"Family farms work when the whole family works the farm." -- Adam Klaus