There’s not really any way to totally eliminate the gap, but there are some things you can do to cover it up. Sliding your mattress to the top of your bed frame can reduce the width of the gap. Upholstered headboards can help cover the gap by filling it in with thick padding. You can also cover it with decorative pillows.