Jason Segel really did write the Dracula Musical in Forgetting Sarah Marshall when he was unemployed!
Five years before Forgetting Sarah Marshall got started up; Jason Segel was out of work and decided to write a Dracula Musical. He honestly thought a puppet Dracula musical would boost his career. He showed it to Judd Apatow and a couple others who laughed hysterically at it. Segel did not mean it as a comedy.
When they were trying to figure out a unique ending to Forgetting Sarah Marshall, Segel mentioned the Dracula musical to Apatow. They figured it was a strange way to end the movie and that it was perfect. So, Segel realized it was a comedy and revised the musical as such.
Segel has apparently always had a love for puppets. Ever since he was a kid he has been fascinated with them. It was natural for him to write a puppet musical and we know he later starred in The Muppets. He had no problem working the puppets during Forgetting Sarah Marshall, because he’s been doing it since he was a kid.