We see it often in television shows. I can see the practical use of it, as it was readily available. But in reality, would this be a waste of an important resource?
(Question inspired by binge watching The Last Kingdom.)
This is likely an element of artistic licence inspired by set dressers, although one that isn't necessarily unrealistic. Things like straw really don't leave a trace in the archaeological record, and if they were used, as far as I'm aware nobody written about it, even in sources which do go into more detail about everyday life in Medieval urban contexts like Lydgate's London Lickpenny.
Chucking hay around is a very convenient way to set dress and make a film set look appropriately 'medieval', however, covering up things like modern kerbs, trailing cables and whatnot. Hay is also used currently at a lot of music festivals to turn large muddy puddles into passable surfaces, so it's entirely valid that a medieval population may have used it for a similar purpose.