As much as the cool kids and pros do, you shouldn't. It can negatively impact the way the Helmet protects you.
If you often get cold with a helmet on, a thin merino balaclava or beanie in addition to the helmets inner can add a lot of warmth.
There are some models where the inner/earpads can be removed with the intention of being replaced with a beanie. If you are going to do it, these models are the easiest to do it safely.