For a long time my Acer Aspire 3 laptop running Windows 10 randomly switches off the screen or goes to sleep. It seems to happen mostly when I'm typing.
Looking in the Event Viewer I would see a Kernel-Power event saying reason for Sleep was "Button or Lid".
At first I thought that I was accidentally pressing the power button (as it is on the F1 key that does not need the Fn key to be held down) but changing the setting to require Fn to be pressed did not help.