  In 1998, Bou\'e and Dupuis proved a variational representation for
exponentials of bounded Wiener functionals. Since their proof involves
arguments related to the weak convergence of probability measures, the
boundedness of functionals seems inevitable. In this paper, we extend the
representation to unbounded functionals under a mild assumption on their
integrability. As an immediate application of the extension, we prove an
analogue of Pr\'ekopa's theorem for Wiener functionals, which is then applied
to formulate the Brascamp-Lieb inequality in the framework of Wiener spaces.
