Pokémon with the Oblivious Ability are immune to infatuation. Infatuation will end as soon as either the affected Pokémon or the Pokémon it is attracted to is removed from the battle. It can also be removed by consuming a Mental Herb or an Eggant Berry, or by playing a Red Flute.
The quote above lists all the ways that infatuation, which is caused by Attract, can be eliminated. Going to sleep is not listed here, meaning that it does not cause infatuation to end. As such, if the Tentacruel wakes up before the battle ends, it will still be infatuated.