Safety is an important favor of faith. Learning your limits of sleep need is a human consequence. If an averra occurs despite good middos during extremes of sleep deprivation, can a soul agree danger was his consequence and not an inherent social or sanity flaw of his own inner soul and being?
Fear of G-d surrounds many days of many lives, but in extreme sleep deprivation, one may not have the reality reasoning stronger to readon with good mind.
One may reason that sleep deprivation must be avoided, but jobs and study have at times required the person to work extended hours and risk many feelings of good wellness of being. A physician in residency or a college student anticipating a crucial exam can be an example.
How do we atone for sins felt during extreme circumstances, whether minor or severe. One may have never engaged.
Sleep deprivation is extremely difficult and challenging and pulls a person to his limits. Sleep deprivation should definitely be avoided whenever possible, however for people that have to be able to function properly under stress, such as doctors, soldiers etc. it provides rigorous training. On the other hand it does put ones personality and middos through an extreme test.
If a person did an aveira he is accountable for it, however being that he was under severe sleep deprivation, which caused his otherwise good middos to flaw, it is dealt with more leniently.
The way to atone for these sins is the same way we atone for other sins, just in this instance it is much easier because the person never intended it in the first place. The way we atone for sins is a three step process 1. by regretting what was done, which you did, 2. By confessing his sin to God, and 3. By accepting on himself to be better in the future. It is possible to use this experience as a lesson for the future that when one is in a situation of sleep deprivation that he needs to mentally prepare himself to have extra patients, etc. so that the next time he will perform better . This way he used the negative experience as a tool to grow, and this is the best form of atonement.
I wish you much success in whatever your endeavors are, and much success in dealing with difficult situations.