I wouldn’t. You want the cot to be associated as a pleasant relaxing place to be not as a place of punishment. At that age they’re too young for punishment, time outs (which aren’t great anyway.)
We deal with tantrums - and they can be epic ones, by basically being calm, ignoring the behaviour, and then being there for a hug when it burns out.
So example : child wants chocolate and is on the kitchen floor in full voice/howling/drumming feet on floor.
I tell him calmly ‘no love, no choc just now. We will have some at the weekend. Would you like to help me with (something distracting.)?’
If he carries on I just keep working around him, ignoring the behaviour but I’ll keep popping by and saying ‘I’m here when you want a hug/love you/we aren’t having chocolate until Saturday.’
It always burns out eventually.! Then a hug, then I distract him.
Don’t punish or sanction at this age. Bright and breezy and not giving in is the way