Quote from Ted in Showdown
[flashback to two weeks before Marshall and Lily's wedding:] Ted: Marshall, what are you doing? Marshall: Going to the bathroom. Ted: In the hall? Marshall: Sleepwalking? Ted: You're wide awake. Marshall: Robbing us? Ted: Dude. [back to the wedding:] Ted: [v.o.] Turns out, all week long he'd been sneaking out to a hotel on 72nd, to meet Lily.