As many time as I've heard of this crime/penalty, I've never read of anyone being executed in any war. See below for Civil War:
The noted historian Bell I. Wiley in "The Life of Billy Yank" say on p. 203 that sleeping on post was punishable by death. He goes on to say that the Union Army was lenient in this regard and on p. 204 says no record of a union soldier dying for this offense can be found.
He does make it quite clear some were sentenced to death even relating the story of a soldier who was actually in front of the firing squad when reprieved, p.204.
Also interesting is the case of the member of the Lewis and Clark expedition who committed the same offense. He was convicted in a court martial and sentenced to 100 lashes on his back for each of four days.
I think I'd rather be shot.
Please accept my invitation to join the Company! My e-mail is email@example.com
To Join the Company of Military Historians click here