For me, option 1 looks better since the triangulation supports the point where the top rails attach. If you want to save material you could go for smaller section tube for the triangulation pieces and the bottom rails since there should be little or no bending moment there. If you want more stiffness you could triangulate each bed rail the same way you have done at the ends.