If your source is Dolby Digital, you may not need anything new - just adjusting your settings. Dynamic range compression is a standard feature, and the bitstream should already include the necessary metadata for the decoder to implement this.
It's been a while since I looked into this in detail, but iirc the decoder must automatically enable dynamic range compression when it's set to two channel output. So avoid configurations where you first convert the audio to 5.1 channel PCM or analog, and then apply downmixing or virtual surround.
If you're using a surround system, most receivers have a night mode as mentioned by others already. Some have also an adaptive system that adjusts the dynamic range based on your volume setting - turn it up and you get the full dynamic range, turn it down and the dynamic range is compressed more as you set the volume lower to try to keep the dialog audible. Many receivers include a microphone for automatic settings, and after calibration know the actual output level. The Dolby Digital bitstream (and I think DTS) include a flag to indicate the overall dialog level, and based on these a receiver can do quite a good job. Some I think go only by the DD metadata, others have a compressor that can be applied to any input.