I know it's been a while since this was posted, but I checked it out today. The lightning flashes in a storm are linked to the speed of time. When you sleep, time is sped up, and so too is the lightning. It's similar to when you increase the time speed in Journey mode.
I'll mark this as Working as Designed since it's not a bug, but I'll also bring it up for further discussion to see if this needs to be changed. Thanks for the report!