I have an almost identical problem at the moment with a 2.8 yo and a 5 mo baby (and previous problems - we went through a hitting phase at about 18 months too).
Now it's not so much hitting as just being troublesome / taking toys and roaring at the baby to scare him / wake him up. Inbetween he is absolutely adorable to him too.
We do a lot of positive praise when he nice to the baby and minimise attention on the negative. We do a lot of explaining about why we give love / help etc. And we show a lot of love all round -to gp/spouse/ baby / ds1 all equally so he knows it's not just the baby that gets it.
THere is a good book about what I (toddler) can do and what baby can't do and why I (toddler) help him.
Rather than make a big thing about NOT being horrid to the baby we say "Oh no that (taking toys) isn't what we do to babies" and then immediately talk about sth else (distraction) and ignore last minor incident.
But if it was hitting our ds would certainly do our step equivalent. I think the trick is to be very urgent / immediate / consistent about it so it's understood there will be immediate consequences for seriously bad behaviour - and if he gets off iI put him back again until he stays there and is then sorry / cuddle. If he smacks me when I put him there he goes back again and he then has to say sorry for (and we DO say "are you sorry FOR whatever it is") hitting baby and hitting mama and then he has to kiss baby AND kiss mama - or he goes back to the chair til he does. I think the key is they must never win when it comes to seriously bad behaviour and the naughty step. i.e. they must never get down before time or learn they can sometimes get away with not going on it if they are naughty enough when mummy's really distracted. Everything stops for really bad behaviour like hitting / throwing. They will soon learn (with occasional blips) but it needs consistency an immediate and absolutely no nonsense response when the behaviour is really bad.
And as another sleep deprived mother my current note to self is never lose your temper when disciplining the child. If you even feel angry, it's probably better not to do it. I have kind of taught myself to discipline them in a kind of detached (it-doesn't-really-affect-me-we-just-don't-do-that) way as I see nursery staff do if that makes sense.
I tend to use a step (or out in corridor) rather than his bedroom as I want him to associate his room with being safe and happy, sleeping and books. Though it is not unknown . I never threaten bed as a punishment.
I also use warning + sanctions a lot - if you do [what you're about to do] then there will be no favourite food / story / bike / football / park / ice cream trip/ drawing. That works pretty well provided the sanction is for something he would've had immediately. I have learnt from experience tha I feel much better about sanctions than bribes incentives.