I am not sure how long is normal in racing terms - I remove hay/feed an hour before working my horse hard - ie galloping/xc.
The reason, as I understand it, is so that the lungs have the space to expand fully. It amazes me how big horses lungs are, if the stomach was full of food, then this would hinder it.
The horses in the yard near me will get nothing to eat after their morning feed on race days unless going to a very local course when they will also get the haylage ration, they travel with nothing and will get no food/ hay until they are back home, probably why so many racehorses have ulcer problems.
When I had a p2p horse in he had adlib haylage, he self regulated and as he got fitter he ate less of his ration so never needed restricting, he traveled with a small net which he would hardly touch, it was taken away on arrival about 2 hours or so before the race and given back once he had fully recovered and was put back on the box.