Bed slats provide support but they can also create some associated problems. Bed slats can move around and fall, which turns them into a hazard for pets who like to get under the bed. \
Shifting bed slats can also create creaking and squeaking noises, which can keep you awake at night if you're sensitive to sounds. \
If the bed frame has holes for screws or it's made of wood, drill the slats to the frame. A single screw on each end of each slat should be enough to keep them from shifting out of place. \
If you have a metal frame or you don't want to attach the slats directly to the frame, cut your own spacers using 1x3 pieces of wood. You can use any wood for spacers. \
Cut spacers and place them along the frame between each one of the slats, filling up the gaps. This will help keep the slats in place so they don't shift around. \