Yes. It strained credibility to see the ship's medical doctor and a trendy psycho-therapist have turns at commanding a capital ship.
That's not who commands such an important ship-- not for an hour, not for ten minutes.
But the average Joe Therapist wouldn't get to command a ship. Crusher and Troi first chose to go through Starfleet Academy when they didn't have to. We saw from Crewman Tarses in "The Drumhead" that medical personnel can go through a special, abbreviated program. They, therefore, presumably, got the same training as every other officer.
Second, they chose to specifically pursue command training, culminating in a test of their abilities that qualified them to command the ship.
Is that the way it would work in today's military? No. But it apparently works that way in Starfleet. If they'd simply said "we're letting the doctor take command," that would have seemed silly. But they justified it with the character's backstories and what we saw on screen.