It reads to me as If the OP wants to join the two side rails with dowel inserted into the end grains to make a pin and socket joint.
It's not going to be possible to drill co-axially aligned holes by hand and the joint will be weak.
If the bed will be fully supported on a flat surface I would use fish plates about 250 mm long. Through bolts will make a very strong joint. 50mm (2x2") is IMO a bit weedy. 50x75 carcassing timber better.
A drill stand will be essential to get holes vertically aligned through the side rails. Once you have one suddenly other jobs become much easier ..
If the camp bed sections are to be stored stacked careful jiggling of relative hole position would allow it to hinge.
Best type of bolts would be only part threaded. M8 x 75mm
Refinement: drill rail holes oversize and glue sleeves inside, plastic pipe would do.
Just to make it clear what I mean by fish plate.