I'm not sure either but my companion just got out of hers in a bar in Diamond City, all I can guess is that the Fusion Core ran out. Not sure you can actually get them to get out of it
I don't think that you can sit on bar stools in power armor...
So that'd mean you just instruct your companion to take a seat. Also I know for sure you cant sleep in power armor.
There should be an option when talking to them.