What is needed
What to Do
What is Happening
What you should have seen was the computer screen appearing to get dimmer. Does the brightness of the screen adjust itself to the room light? This would certainly be surprising! In fact, as the title states, the problem is in your head. Specifically, it's in your eyes!
The irises in your eye change the size of your pupil to accommodate to different light levels. If it is bright in a room (or outside), your pupils get quite small, to limit the light that comes in. If it is dim in a room (or if you are outside at night), your pupils get larger to let more light in.
When the lights in the room are off, the room is dim, and so your pupils open wide to let lots of light in. A lot of light from the screen can therefore come into your eyes, and so the screen looks quite bright. Now, when you turn the lights on, the room is bright. Your pupils get smaller, to exclude some of the light. The screen stays the same brightness, but now less of the light from it gets into your eyes, and so the screen will look dimmer!
If you have having trouble seeing the effect, change what is on the screen. For me, it works best if the screen hs a few bright areas, with most of the screen dark. And you have to be back pretty far for the best effect.
Other Things to Try
I think how well you see this one might be age-related. I think young people's eyes adjust to light levels much more quickly than do the eyes of older folks, and so for them the change will be much quickerand perhaps less dramatic. If you have a group of people to try this with and find this to be the case (or if you find it NOT to be the case), please let us know! I have found a bunch of different optical effects and optical illusions that work well for young people or old people but not both, and I suspect this is one.