Welcome. It is slow around here on weekends but you will get some good feed back.
Please, don't blame the affair on yourself. We all do but this is her issue not yours. Nothing you did or did not do caused her to cheat.
Please read through the Healing Library on the left of your screen. You will learn much from those of us who have stood in your shoes.
I too had sleep issues at the beginning. I found that over the counter sleep aids helped but don't feel bad asking your doc for something stronger if necessary.
I think it is a good sign that she confessed. But prepare yourself as they most often lie and minimize the extent of the affair. We call this trickle truth or TT as you only receive tidbits of the truth. At first, my husband only admitted what I had already uncovered. He let me believe that the affair started on Valentines Day when I was away. Phone records indicated it started much earlier.. Probably the October before. Each lie uncovered brings another round of pain.
I hope you can get some rest tonight. Keep posting.