The first thing you should try and do is physically disconnect your monitor from all cables. This includes the power cable. For some electronics, it's not enough to power them off and restart them, but instead make sure there is no electric current at all for at least 30 seconds. I recently had a monitor that was unresponsive to controls itself. Physically unplugging it for a minute allowed the circuitry inside to reset completely and it was fine.
If your computer is running Windows, then there is a potential solution inside Windows. Open your Control Panel, and then go to Power Options. Choose your power plan and then click on Change Plan Settings. Once you do that, open the Change Advanced Power Settings Option and choose your preferred level of performance. Then, open the Display option and turn off or disable the Enable Adaptive Brightness option. This should prevent your computer from randomly dimming your monitor and maintain your preferred brightness.
For further buttonless display control over your monitors, try the ScreenBright or Display Tuner apps, although these don't work with all monitors.