Easiest way is to use variables and single "set" tasks to do as you like.
In the tasks, for example "VolumeControl", you create a load of If statements. The order of these will be your priority. For example:
If %NIGHTTIME = True
Alarm Volume = 0
Notification Volume = 0
Ringer Volume = 0
Silent Mode = On
etc
Stop
End If
When the over night profile is active, you will set %NIGHTTIME to True, then call VolumeControl which will do the work. So, its now night time and you flip the phone. This profile will then set %FLIPPED to True, then call VolumeControl. If you wish this to override the volumes during the night, you would add the following ABOVE the NIGHTTIME entry in the VolumeControl task, eg:
If %FLIPPED = True
Alarm Volume ...
etc
Stop
End If
If %NIGHTTIME = True
Alarm Volume = 0
Notification Volume = 0
Ringer Volume = 0
Silent Mode = On
etc
Stop
End If
So in this case, even if its night, the volumes will be set to whatever you want. When you flip if back down, you'd set FLIPPED to False, and call VolumeControl in the Exit task. This time the "If %FLIPPED" would be skipped (as its False), but as %NIGHTTIME is still True, the volumes will be made silent again.
On the other hand, if you never want sound over night, make sure its always the top statement in VolumeControl - then it will always be executed first, and the task aborted at the Stop, hence keeping everything quiet.
Lastly, set the Exit task of the Night profile to set %NIGHTTIME to False, and then to call VolumeControl. After all the other If statements, add your default volume settings. When the Night profile exits at 0600 and calls VolumeControl, as all the other If statements will evaluate to false, they will all be skipped and the entries at the very end will be executed, therefore setting the volumes to your "defaults":
If %FLIPPED = True
Alarm Volume ...
etc
Stop
End If
If %NIGHTTIME = True
Alarm Volume = 0
Notification Volume = 0
Ringer Volume = 0
Silent Mode = On
etc
Stop
End If
Alarm Volume = 6
Notification Volume = 7
Ringer Volume = 5
Silent Mode = Off
etc
etc
Using variables and single "set" tasks is a very powerful and flexible way of getting Tasker to do exactly what you want, when you want it.
I use setVolume, setDisplay etc etc to do this kind of things. It was a bit confusing to begin with, but easier once you get going.
Hope that helps,