Tinnitus is the sensation of ringing in the ears, and I am sorry to hear that you are having do deal with this so frequently. It is very common, and varies in severity and how it affects your ability to function. One of the leading theories about how tinnitus develops is that it is caused by the absence of sound. Your brain, being so used to receiving feedback constantly from your ears, does not know what to make of silence. Since silence is so rare, it creates a sound (usually a ringing sound like you describe), to fill the void.
Tinnitus is especially noted in people who have had a long history of loud noise exposure, and all of us experience it for a short time immediately after being in a very noisy place. Your specific variation of noticing it mostly at night could relate either to the fact that you are in a quiet place at that time, or to the fact that you are more tired at night and the sound is created more readily in that state.
Either way, tinnitus can also be caused by some other rare conditions that are treatable. If your symptoms become worse, begin to affect you hearing, or are accompanied by other complaints, please see an ear-nose-and throat surgeon
) to discuss.