The Swiss pass covers public transportation in Switzerland only. There is one exception that extends south to Domodossola, Italy as that is a connecting point back into Locarno, Switzerland. You'll need a ticket from Venice to the Italian/Swiss border.
For the night train run you mention, you will be on three different trains. You change to the night train in Bologna and depart there at 23:18. You change again at Brig at 4:39 to an Intereggio train that is not a sleeper. Not much opportunity to sleep.
If this were not a night train, I would simply suggest that you purchase the Venice/Brig ticket when you arrive in Venice. The ticket agent can handle the whole affair. However, with the night train, you really need to book as soon as you can as the night trains do fill up and Trenitalia will be no help in advance. Since you may have a Swiss pass, I would suggest contacting the Swiss train website (www.sbb.ch/en/index.htm) by email and asking them if they will sell you the portion of the ticket you need. They do respond quickly and in great English.
Same rules apply for a night train from Zurich to Rome. The Swiss pass covers you only within Switzerland.