Of course there is.
player.addperk [ID] 1
player.removeperk [ID] 1
Well, not sure if the "1" is supposed to be there but it usually is.
When wondering if there is console command for X, just try it out. It's how I found the console command "clearownership". Was frustrated when no free beds, just typed something in the console and it worked.
Don't need the "1". Also, if the perk is in a dlc, you'll have to know the load order of your dlcs so you can put "01", "02', etc. in front of the perk id number.
@ Pistolero: I always use
setownership on beds. I think that command sets it so that it gives you the xp buff and so that no npcs will sleep there. I'm not really sure, since I've never completely tested it, but I think that's what it does.
-Gunny