Sadly, it's totally random. Whenever you walk into the blue mushroom, it has a ~1/4th chance of warping you to the Otherworld, and as far as I know, there's nothing you can do to increase your chances or make it a guarantee,,
There's 2 ways you can approach it; on day 4, go in and out of the blue mushroom until you get a successful Otherworld warp, or, if you aren't warped there immediately, simply continue on and pray you DO get warped there on Day 5 or Day 6 (BEFORE investigating the haunted property), when you use the blue mushroom again.
The Otherworld warp can happen ANY time you walk into the blue mushroom Day 4-6. So if you aren't lucky the very first time you use it Day 4, your run is still salvageable! As long as you get there before the investigation at the end of Day 6.