A mattress cannot sit on a bed frame without support from slats to hold its weight up. The size of the slats you need depends on whether your bed is twin, full, queen or king. A normal king-size bed measures 76 inches across, but a California king is 72 inches wide. If you need to replace bed slats, you can measure the distance from one side to the other and purchase new ones or make them yourself.
Measure the distance from one side of the bed frame to the other. Write down the measurement in inches.
Take another measurement about 1 foot higher than the previous spot and 1 foot lower than the first measurement. This will confirm that your frame is the same distance for the entire length of the bed.
Purchase 1-by-4-inch boards from your local lumber yard. Cut each one approximately 1/2 inch shorter than your width measurements. Some lumber yards will even cut the boards for you. You will need five slats.
Sand the edge of each board down with fine-grit sandpaper to reduce the chances of splinters.
Place one slat at the top of the bed along the headboard. Place a second slat by the footboard. Space each additional slat approximately 18 inches apart.