|A hardware fault is possible, such as overheating - so ensure the vents are clear. |
Is this a Windows, BIOS or hard disk password? If it is one of the last two it puts the possibility of it being a hardware issue further up the list.
You could also try this which as helped unstick computers at odd times:
Turn off, disconnect from domestic power, then remove the main battery. Hold the Power Off/On button down for about 30 seconds. See if it is the same on reassembly.
Always pop back and let us know the outcome - thanks