The US and UK currently ban electronic devices larger than a mobile phone in carry-on luggage from certain countries in and around the Middle East and North Africa.
Other than that, I'm not aware of any other restriction on bringing laptops and their mains power supplies onto planes as hand luggage. Indeed, many airlines allow you to bring a laptop bag as a second piece of carry-on.
To be sure, check the baggage regulations of the airline you'll be travelling on and the pages about hand baggage and security on your airport's website. But the answer will be "Yes, that's fine" unless there's something unusual going on (and the US/UK ban is unusual).
Note that some airports might ask you to switch on the laptop, to prove that it works. (People have tried to smuggle bombs in hollowed-out laptops.) So make sure there's some charge in your battery when you go through security.