As cov says you need to keep the wort above about 50C, else microbes can sour the wort. Even if you boil it after the damage will have been done.
However you could try dong a long overnight/all day mash for about 11 hours then warm it back up again if your doing BIAB then keep it warm again for a further 11 hours.
I've never actually tried this although I have done several overnight mashes (I lost about 10C-11C over about 11 hours) but I think it might work in theory. When you heat the mash back up you need to continually stir the mash so the bag doesnt burn (again I have done this on several occasions too so know this bit does work)