Prevacid is a Tagamet,Zantac type of med.
Not exactly the same as those-they both approach the same disorder from different physiological directions.
In your situation I believe it was given to prevent acid from sneaking back up your esophagus while you were on your back for extended periods of time.
Esophogeal Reflux is the official name of that "backing up" problem.