At the bottom of the 2x8 i glued and screwed a 2x4 lengthwise , then ran 8 2x4 slats with 1/2" plywood on top of that. I was going to use 1/4 for the slats but they were more expensive than the 2x4's.
Technically it's not a bunk bed as the bottom bed is a pedestal bed built out of 2" square...