To select each component:
- Floor - select a face on the floor and hit Shift+G --> coplanar
- Top - same as floor (just select a top face)
- Walls - select any face from the top and any from the floor, select coplanar again, then invert the selection with Ctrl+I. Alternatively, select any two wall faces with different normals and select similar normals with Shift+G
To unwrap the floor and top, I'd suggest going into a top-down view and using project from view. Then scale up the UV's to be a reasonable size for a tiled texture.
For the walls, select and hide the top and floor components, then use L to select a section and unwrap with follow active quads (must make one face active in the selected group first). You'd need to do this for every island. This will give the benefit that the texture wraps cleanly around corners.
If you are fine without this benefit, select a wall face going in one direction, then do Shift+G --> normals, then unwrap with
Project from View after setting your view appropriately. Finally, deselect everything and do the same to the wall faces going in the other direction.
Here is an example maze with concrete and dirt textures split with walls and floor by this method:
Another option is to use UltiMaze (disclaimer - I am the developer) and use tiled objects that are already textured. You can download the add-on for free here, purchase or read the documentation here, or discuss the add-on here. If you don't want to bother yourself with going to GitHub, use this direct link to download the master zip that you can install.
These "mazes", e.g., were generated using this technique: