A nice ladder can be built similar to the following. Use 1x4 sized material and bore holes through it to accept closet pole for rungs. Select the angle of the vertical rails to suit your space and desired usage preferences. Rung spacing should be even - but not too close together.
Ladder can be simply screwed through the side rail of the bed into the edge of the vertical ladder rail.
![enter image description here](https://i.stack.imgur.com/Hwqrg.png)
Considering that you have a relatively high sideboard/headboard and footboard arrangement, that can be used to help strengthen the headers around the perimeter. The strength of a piece of 3/4" plywood, 21 plus inches tall on the sides alone with a small ledger to support the joists and bed slats is sufficient if all is glued and screwed together and has a sufficient bearing surface, 1" is ample.
Since it is for sleeping, typically at most for two people, and if you have kids too, the bed would need to hold say only the weight of 4 to 6 people, then add a little more to cover murphy's law so the weight of 2 adults and 4 kids may run about 700 lbs., let's take that to 1000 lbs., kids jump up and down.
The bed you have at nearly a 7 ft average on both sides will yield 49 sq ft, multiply that by 40 lbs/sq ft and it will carry 1960 lbs. a little overkill but ok. So the live load using the AWC calculator at 7 lbs dead load and 30 lbs live load at 16 inch centers you can use 2X6's and still carry a 10+ span with SPF or 8+ with D Fir, plenty strong.... The same calculator gives a recommendation for the bearing ends of .30 or so of an inch, Don't be fooled on what an inch of bearing can do. I would expect if you mortise the ends in and secure it with a screws (gauge your screw length properly for end grain) It will do all you expect.
The matter at hand is the headers at either end, I had supposed the side boards etc., were to be fixed permanently to keep the occupants safe, therefore I was going to use that as part of the structure too to keep the bulk of everything down. If they are to be hinged or drop down then the header will need to work on its own, I would suggest using a 2X8 for the perimeter, mortise and tenoned for shear strength and use a captured nut with bolt to draw the joints together. That with the face of the 2X8 against the faces of the legs will give a lot of lateral resistance. For your own investigation, and practice on making this critical connection, make a sample joint and put it to the test.
I have used this type of connector to hold a 7 ft wide 4 ft tall gate out of 2 inch thick solid mahogany using standard bolts and site made washers to fit the slot for the nut- Four 1/2 inch bolts were used for this, still hanging after eight years outside
Just as a mention, and you may know this already, the AWC calculator is for home building, quite the different animal than furniture making.
Reread your comment and missed a point, if the mortices were not all the way through and the bottom of the mortice was 2 inches plus above the bottom of the header with no knots or curly grain, it will not weaken the header enough to cause concern. Give a look at some of the beds at places like Ikea or Crate and Barrel, or something like that....
Best Answer
Since you are doing sturdy x-bracing under the bed itself, and two adjacent sides are cross braced as well, you have three braced frames in three planes, and none of the frames are overly long and skinny, there is adequate bracing for the entire structure. If you can in any way anchor the structure to the walls as well for additional rigidity, you will be better off.
Even if you can't, as long as the frames are truly rigid and do not rack in the least, you will be fine. The one unbraced post is a bit of a problem unless anchored at the base because it can move if bumped against. If bumped hard enough, you could lose the vertical support at that corner. Thus the connection of this post must be as rigid as possible at the top connection to the bed frame. It's essentially like a table leg, a loose one is nearly useless.