I recently made the boys a “loft/fort” out of old flannel sheets that is familiar to this. I used cotton twine to hang the sheets on (instead of the poles in this pic) and used ceiling hooks to secure line. I also hung sheets on the bottom bunk too.
Tent on top bunk . Source: Delightful Distractions - HOME SWEET HOME. Easy DIY using fabric or even sheets. For bottom, build in rod and use curtain hangers or tack Velcro to wood and panel for a more stationary curtain. For top bunk, hang from ceiling.