Just out of interest, why do you keep the magazine in your rifle if the rifle is in your safe?
That's the way most people store an HD long gun in a safe, from my experience. Chamber empty, magazine loaded, safety on, the same way you'd typically store a pump shotgun kept for HD.
To the OP, you might want to simplify your routine a bit. First of all, I'd personally have
one AR out; you can only wield one, and if for some reason you have to leave the room, you have left a loaded rifle unattended for your hypothetical burglar's accomplice to grab and use against you. I think an AR is a fine choice for HD (it's my first choice as well) but one AR next to your bed is a weapon; two AR's (if you live alone) equal one weapon and one distraction.
IMO there is no need to cycle the bolt and pull the trigger every time you pull it out of the safe and put it back. Pick which AR you want to use for HD, remove the magazine, lock the bolt back, and make 100% sure visually and otherwise that the chamber and magwell are empty. Now lower the bolt, close the dust cover, insert a loaded magazine, and
leave it that way, loaded magazine inserted, chamber
empty, safety
on (note that this requires the hammer to be back). Pull it out of the safe that way in the evening, put it back that way in the morning, and
always treat it as if there's a round in the chamber (Rule One). ND's are more likely when you are constantly loading and unloading it, especially if you are verifying chamber-empty by pulling the trigger.
In the unlikely event that you have a break-in, run the charging handle when you pick it up; otherwise leave it alone.
Get yourself a copy of
Green Eyes, Black Rifles by Kyle E. Lamb and Magpul Dynamics'
Art of the Tactical Carbine and study them both, and if/when you can afford to, take a carbine class.
Finally, you did well keeping it pointed in a more or less safe direction, but the safest direction when you are on the first floor of a multi-story building (or out in the open) with a .223 loaded with JHP or other frangible ammo, is at an angle at the floor two or three feet away from where you are standing. An ND into a concrete slab will result in some spattering concrete, some dust, and a hole in any overlying carpet, but there is zero chance of it exiting the house. For an impact at a relatively steep angle, .223 is less likely to richochet than typical handgun or shotgun rounds.