Camco makes some nice replacement end caps:
https://www.amazon.com/Camco-40324-I.../dp/B00C5SSDUO
As the other reply pointed out, the platform being cut a bit smaller than the mattress is actually a feature to keep you from scraping a leg on the rough edge.
I'm fortunate to be a fairly small guy. I fit nicely in a short queen.
That is something to watch out for though if you're on the taller side.