Measure from the floor to the top of the top bunk's base. Record the measurement.
Cut the two pieces of wood that will serve as the sides of the stairs using the measurement you recorded. Cut 45-degree angles on both ends of each piece of wood. This is necessary so that each side will lay squarely against the floor and the side of the top bunk.
Cut the last piece of wood into 12-inch lengths. These will serve as the steps for the stairs. Sand the edges of each piece of wood to smooth out any roughness.
Lay the two sides of the stairs on the ground, then measure and mark 1-foot intervals along the length of each side.
Attach the steps to the sides at the marked intervals with nails. Stand the set of stairs up and lean it against the side of the top bunk. The stairs should be upright with the 45 degree angle sides facing the top bunk and the floor.
Connect the stairs to the bunk bed. Drill holes through the top of each side of the stairs and into the bunk bed. Place bolts into each hole and secure them to hold the stairs in place.