A big barn should be plenty of space for 38 for a few weeks.
Keep in mind they'll still likely tear up the grass once they're let back out, unless you have much better forage areas further away from the barn. :)
How many birds? It looks like a big structure so as long as you don't have a large flock space shouldn't be an issue. They may temporarily stop laying from stress or lack of light, though maybe it's brighter in there than photos indicate.