Is brushing your teeth the last thing you do before bed? If you have trouble falling asleep, you might want to change that.
Don't skip it altogether, or you'll quickly attain "gross person" status. But brushing a little EARLIER might be a good idea.
If it always takes you a long time to fall asleep, your pre-bedtime routines might have something to do with it, including when you brush.
Any sort of activity right before bed can jolt you awake a little bit and tell your body it's not time to sleep yet. That includes brushing your teeth, washing your face, or even just turning on a bright light in your bathroom.
So try doing all that stuff 30 minutes to an hour before your normal bedtime. Then you can go straight to bed, and hopefully fall asleep faster.
Just don't dig into that midnight snack or you'll have to brush again. In fact, brushing earlier could also encourage you to skip the late-night snacking, and maybe lose a little weight.